Skip to content

Commit

Permalink
Windows 11 - May 2022 Samples Update 2
Browse files Browse the repository at this point in the history
* BluetoothLE: C++/WinRT translation errors
* CustomCapability: Stick with .NET version 5.0.0, aligns with other samples
* WebAuthenticationBroker: Fix C++/CX Facebook oauth scope to match C#
* Add SECURITY.md, fix README links due to rename of default branch
  • Loading branch information
oldnewthing committed May 26, 2022
1 parent 589f33b commit ad9a0c4
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -7,7 +7,7 @@
This repo contains the samples that demonstrate the API usage patterns for the Universal Windows Platform (UWP) in the Windows Software Development Kit (SDK) for Windows 10. These code samples were created with the Universal Windows Platform templates available in Visual Studio, and are designed to run on desktop, mobile, and future devices that support the Universal Windows Platform.

> **Note:** If you are unfamiliar with Git and GitHub, you can download the entire collection as a
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/master.zip), but be
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/main.zip), but be
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).
> For more samples, see the [Samples portal](https://aka.ms/winsamples) on the Windows Dev Center.
Expand All @@ -26,7 +26,7 @@ Additionally, to stay on top of the latest updates to Windows and the developmen

The easiest way to use these samples without using Git is to download the zip file containing the current version (using the following link or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in Visual Studio.

[Download the samples ZIP](../../archive/master.zip)
[Download the samples ZIP](../../archive/main.zip)

**Notes:**
* Before you unzip the archive, right-click it, select **Properties**, and then select **Unblock**.
Expand Down
41 changes: 41 additions & 0 deletions SECURITY.md
@@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->

## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).

If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
2 changes: 2 additions & 0 deletions Samples/BluetoothLE/cppwinrt/Package.appxmanifest
Expand Up @@ -38,5 +38,7 @@
</Applications>
<Capabilities>
<Capability Name="internetClient"/>
<!--BT_Code: Always declare the bluetooth capability when using Bluetooth-->
<DeviceCapability Name="bluetooth" />
</Capabilities>
</Package>
2 changes: 1 addition & 1 deletion Samples/BluetoothLE/cppwinrt/Scenario2_Client.cpp
Expand Up @@ -309,7 +309,7 @@ namespace winrt::SDKTemplate::implementation
{
auto lifetime = get_strong();

auto selectedItem = ServiceList().SelectedItem().as<ComboBoxItem>();
auto selectedItem = CharacteristicList().SelectedItem().as<ComboBoxItem>();
selectedCharacteristic = selectedItem ? selectedItem.Tag().as<GattCharacteristic>() : nullptr;

if (selectedCharacteristic == nullptr)
Expand Down
Expand Up @@ -117,7 +117,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.4.0</Version>
<Version>5.0.0</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
2 changes: 1 addition & 1 deletion Samples/CustomCapability/cs/CustomCapability.csproj
Expand Up @@ -225,7 +225,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.4.0</Version>
<Version>5.0.0</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
Expand Up @@ -46,7 +46,7 @@ void Scenario2_oAuthFacebook::Launch_Click(Object^ sender, Windows::UI::Xaml::Ro
return;
}

facebookURL += clientID + "&redirect_uri=" + Uri::EscapeComponent(FacebookCallbackUrl->Text) + "&scope=read_stream&display=popup&response_type=token";
facebookURL += clientID + "&redirect_uri=" + Uri::EscapeComponent(FacebookCallbackUrl->Text) + "&scope=email&display=popup&response_type=token";

try
{
Expand Down

0 comments on commit ad9a0c4

Please sign in to comment.