Skip to content

Commit ad9a0c4

Browse files
committed
Windows 11 - May 2022 Samples Update 2
* 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
1 parent 589f33b commit ad9a0c4

File tree

7 files changed

+49
-6
lines changed

7 files changed

+49
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
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.
88

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

2727
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.
2828

29-
[Download the samples ZIP](../../archive/master.zip)
29+
[Download the samples ZIP](../../archive/main.zip)
3030

3131
**Notes:**
3232
* Before you unzip the archive, right-click it, select **Properties**, and then select **Unblock**.

SECURITY.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
2+
3+
## Security
4+
5+
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/).
6+
7+
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.
8+
9+
## Reporting Security Issues
10+
11+
**Please do not report security vulnerabilities through public GitHub issues.**
12+
13+
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).
14+
15+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). 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).
16+
17+
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).
18+
19+
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:
20+
21+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22+
* Full paths of source file(s) related to the manifestation of the issue
23+
* The location of the affected source code (tag/branch/commit or direct URL)
24+
* Any special configuration required to reproduce the issue
25+
* Step-by-step instructions to reproduce the issue
26+
* Proof-of-concept or exploit code (if possible)
27+
* Impact of the issue, including how an attacker might exploit the issue
28+
29+
This information will help us triage your report more quickly.
30+
31+
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.
32+
33+
## Preferred Languages
34+
35+
We prefer all communications to be in English.
36+
37+
## Policy
38+
39+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40+
41+
<!-- END MICROSOFT SECURITY.MD BLOCK -->

Samples/BluetoothLE/cppwinrt/Package.appxmanifest

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,7 @@
3838
</Applications>
3939
<Capabilities>
4040
<Capability Name="internetClient"/>
41+
<!--BT_Code: Always declare the bluetooth capability when using Bluetooth-->
42+
<DeviceCapability Name="bluetooth" />
4143
</Capabilities>
4244
</Package>

Samples/BluetoothLE/cppwinrt/Scenario2_Client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ namespace winrt::SDKTemplate::implementation
309309
{
310310
auto lifetime = get_strong();
311311

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

315315
if (selectedCharacteristic == nullptr)

Samples/CustomCapability/Service/Osrusbfx2Task/Osrusbfx2Task.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
</ItemGroup>
118118
<ItemGroup>
119119
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
120-
<Version>5.4.0</Version>
120+
<Version>5.0.0</Version>
121121
</PackageReference>
122122
</ItemGroup>
123123
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">

Samples/CustomCapability/cs/CustomCapability.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
</ItemGroup>
226226
<ItemGroup>
227227
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
228-
<Version>5.4.0</Version>
228+
<Version>5.0.0</Version>
229229
</PackageReference>
230230
</ItemGroup>
231231
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">

Samples/WebAuthenticationBroker/cpp/Scenario2_oAuthFacebook.xaml.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void Scenario2_oAuthFacebook::Launch_Click(Object^ sender, Windows::UI::Xaml::Ro
4646
return;
4747
}
4848

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

5151
try
5252
{

0 commit comments

Comments
 (0)