react-native-windows 0.71.6 → 0.71.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.71.
|
|
13
|
+
<ReactNativeWindowsVersion>0.71.8</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>71</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>8</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>b5e7ba6012efa021816448f0801316467368cde5</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<EnableDevServerHBCBundles Condition="'$(EnableDevServerHBCBundles)' == ''">false</EnableDevServerHBCBundles>
|
|
25
25
|
|
|
26
26
|
<UseV8 Condition="'$(UseV8)' == ''">false</UseV8>
|
|
27
|
-
<V8Version Condition="'$(V8Version)' == ''">0.
|
|
27
|
+
<V8Version Condition="'$(V8Version)' == ''">0.71.2</V8Version>
|
|
28
28
|
<V8PackageName>ReactNative.V8Jsi.Windows</V8PackageName>
|
|
29
29
|
<V8PackageName Condition="'$(V8AppPlatform)' != 'win32'">$(V8PackageName).UWP</V8PackageName>
|
|
30
30
|
<V8Package>$(NuGetPackageRoot)\$(V8PackageName).$(V8Version)</V8Package>
|
|
@@ -37,22 +37,26 @@ namespace Microsoft::React::Networking {
|
|
|
37
37
|
|
|
38
38
|
#pragma region OriginPolicyHttpFilter
|
|
39
39
|
|
|
40
|
-
#pragma region
|
|
40
|
+
#pragma region CaseInsensitiveComparer
|
|
41
41
|
|
|
42
|
-
bool OriginPolicyHttpFilter::
|
|
42
|
+
bool OriginPolicyHttpFilter::CaseInsensitiveComparer::operator()(const wchar_t *a, const wchar_t *b) const {
|
|
43
43
|
return _wcsicmp(a, b) < 0;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
bool OriginPolicyHttpFilter::CaseInsensitiveComparer::operator()(const wstring &a, const wstring &b) const {
|
|
47
|
+
return _wcsicmp(a.c_str(), b.c_str()) < 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#pragma endregion CaseInsensitiveComparer
|
|
47
51
|
|
|
48
52
|
// https://fetch.spec.whatwg.org/#forbidden-method
|
|
49
|
-
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::
|
|
50
|
-
{L"CONNECT", L"TRACE", L"TRACK"};
|
|
53
|
+
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::CaseInsensitiveComparer>
|
|
54
|
+
OriginPolicyHttpFilter::s_forbiddenMethods = {L"CONNECT", L"TRACE", L"TRACK"};
|
|
51
55
|
|
|
52
|
-
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::
|
|
56
|
+
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::CaseInsensitiveComparer>
|
|
53
57
|
OriginPolicyHttpFilter::s_simpleCorsMethods = {L"GET", L"HEAD", L"POST"};
|
|
54
58
|
|
|
55
|
-
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::
|
|
59
|
+
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::CaseInsensitiveComparer>
|
|
56
60
|
OriginPolicyHttpFilter::s_simpleCorsRequestHeaderNames = {
|
|
57
61
|
L"Accept",
|
|
58
62
|
L"Accept-Language",
|
|
@@ -64,11 +68,11 @@ bool OriginPolicyHttpFilter::ConstWcharComparer::operator()(const wchar_t *a, co
|
|
|
64
68
|
L"Viewport-Width",
|
|
65
69
|
L"Width"};
|
|
66
70
|
|
|
67
|
-
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::
|
|
71
|
+
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::CaseInsensitiveComparer>
|
|
68
72
|
OriginPolicyHttpFilter::s_simpleCorsResponseHeaderNames =
|
|
69
73
|
{L"Cache-Control", L"Content-Language", L"Content-Type", L"Expires", L"Last-Modified", L"Pragma"};
|
|
70
74
|
|
|
71
|
-
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::
|
|
75
|
+
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::CaseInsensitiveComparer>
|
|
72
76
|
OriginPolicyHttpFilter::s_simpleCorsContentTypeValues = {
|
|
73
77
|
L"application/x-www-form-urlencoded",
|
|
74
78
|
L"multipart/form-data",
|
|
@@ -76,7 +80,7 @@ bool OriginPolicyHttpFilter::ConstWcharComparer::operator()(const wchar_t *a, co
|
|
|
76
80
|
|
|
77
81
|
// https://fetch.spec.whatwg.org/#forbidden-header-name
|
|
78
82
|
// Chromium still bans "User-Agent" due to https://crbug.com/571722
|
|
79
|
-
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::
|
|
83
|
+
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::CaseInsensitiveComparer>
|
|
80
84
|
OriginPolicyHttpFilter::s_corsForbiddenRequestHeaderNames = {
|
|
81
85
|
L"Accept-Charset",
|
|
82
86
|
L"Accept-Encoding",
|
|
@@ -99,13 +103,13 @@ bool OriginPolicyHttpFilter::ConstWcharComparer::operator()(const wchar_t *a, co
|
|
|
99
103
|
L"Upgrade",
|
|
100
104
|
L"Via"};
|
|
101
105
|
|
|
102
|
-
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::
|
|
106
|
+
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::CaseInsensitiveComparer>
|
|
103
107
|
OriginPolicyHttpFilter::s_cookieSettingResponseHeaders = {
|
|
104
108
|
L"Set-Cookie",
|
|
105
109
|
L"Set-Cookie2", // Deprecated by the spec, but probably still used
|
|
106
110
|
};
|
|
107
111
|
|
|
108
|
-
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::
|
|
112
|
+
/*static*/ set<const wchar_t *, OriginPolicyHttpFilter::CaseInsensitiveComparer>
|
|
109
113
|
OriginPolicyHttpFilter::s_corsForbiddenRequestHeaderNamePrefixes = {L"Proxy-", L"Sec-"};
|
|
110
114
|
|
|
111
115
|
/*static*/ Uri OriginPolicyHttpFilter::s_origin{nullptr};
|
|
@@ -293,7 +297,7 @@ bool OriginPolicyHttpFilter::ConstWcharComparer::operator()(const wchar_t *a, co
|
|
|
293
297
|
}
|
|
294
298
|
|
|
295
299
|
/*static*/ OriginPolicyHttpFilter::AccessControlValues OriginPolicyHttpFilter::ExtractAccessControlValues(
|
|
296
|
-
|
|
300
|
+
IMap<hstring, hstring> const &headers) {
|
|
297
301
|
using std::wregex;
|
|
298
302
|
using std::wsregex_token_iterator;
|
|
299
303
|
|
|
@@ -22,19 +22,20 @@ class OriginPolicyHttpFilter
|
|
|
22
22
|
: public winrt::
|
|
23
23
|
implements<OriginPolicyHttpFilter, winrt::Windows::Web::Http::Filters::IHttpFilter, IRedirectEventSource> {
|
|
24
24
|
public:
|
|
25
|
-
struct
|
|
25
|
+
struct CaseInsensitiveComparer {
|
|
26
26
|
bool operator()(const wchar_t *, const wchar_t *) const;
|
|
27
|
+
bool operator()(const std::wstring &, const std::wstring &) const;
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
private:
|
|
30
|
-
static std::set<const wchar_t *,
|
|
31
|
-
static std::set<const wchar_t *,
|
|
32
|
-
static std::set<const wchar_t *,
|
|
33
|
-
static std::set<const wchar_t *,
|
|
34
|
-
static std::set<const wchar_t *,
|
|
35
|
-
static std::set<const wchar_t *,
|
|
36
|
-
static std::set<const wchar_t *,
|
|
37
|
-
static std::set<const wchar_t *,
|
|
31
|
+
static std::set<const wchar_t *, CaseInsensitiveComparer> s_forbiddenMethods;
|
|
32
|
+
static std::set<const wchar_t *, CaseInsensitiveComparer> s_simpleCorsMethods;
|
|
33
|
+
static std::set<const wchar_t *, CaseInsensitiveComparer> s_simpleCorsRequestHeaderNames;
|
|
34
|
+
static std::set<const wchar_t *, CaseInsensitiveComparer> s_simpleCorsResponseHeaderNames;
|
|
35
|
+
static std::set<const wchar_t *, CaseInsensitiveComparer> s_simpleCorsContentTypeValues;
|
|
36
|
+
static std::set<const wchar_t *, CaseInsensitiveComparer> s_corsForbiddenRequestHeaderNames;
|
|
37
|
+
static std::set<const wchar_t *, CaseInsensitiveComparer> s_corsForbiddenRequestHeaderNamePrefixes;
|
|
38
|
+
static std::set<const wchar_t *, CaseInsensitiveComparer> s_cookieSettingResponseHeaders;
|
|
38
39
|
|
|
39
40
|
// NOTE: Assumes static origin through owning client/resource/module/(React) instance's lifetime.
|
|
40
41
|
static winrt::Windows::Foundation::Uri s_origin;
|
|
@@ -42,9 +43,9 @@ class OriginPolicyHttpFilter
|
|
|
42
43
|
struct AccessControlValues {
|
|
43
44
|
winrt::hstring AllowedOrigin;
|
|
44
45
|
winrt::hstring AllowedCredentials;
|
|
45
|
-
std::set<std::wstring> AllowedHeaders;
|
|
46
|
+
std::set<std::wstring, CaseInsensitiveComparer> AllowedHeaders;
|
|
46
47
|
std::set<std::wstring> AllowedMethods;
|
|
47
|
-
std::set<std::wstring> ExposedHeaders;
|
|
48
|
+
std::set<std::wstring, CaseInsensitiveComparer> ExposedHeaders;
|
|
48
49
|
size_t MaxAge;
|
|
49
50
|
};
|
|
50
51
|
|