@cloudflare/workers-oauth-provider 0.0.9 → 0.0.11
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.
- package/dist/oauth-provider.js +2 -2
- package/package.json +1 -1
package/dist/oauth-provider.js
CHANGED
|
@@ -1052,7 +1052,7 @@ async function hashSecret(secret) {
|
|
|
1052
1052
|
return generateTokenId(secret);
|
|
1053
1053
|
}
|
|
1054
1054
|
function generateRandomString(length) {
|
|
1055
|
-
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
1055
|
+
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
1056
1056
|
let result = "";
|
|
1057
1057
|
const values = new Uint8Array(length);
|
|
1058
1058
|
crypto.getRandomValues(values);
|
|
@@ -1221,7 +1221,7 @@ var OAuthHelpersImpl = class {
|
|
|
1221
1221
|
const state = url.searchParams.get("state") || "";
|
|
1222
1222
|
const codeChallenge = url.searchParams.get("code_challenge") || void 0;
|
|
1223
1223
|
const codeChallengeMethod = url.searchParams.get("code_challenge_method") || "plain";
|
|
1224
|
-
if (
|
|
1224
|
+
if (redirectUri.startsWith("javascript:") || redirectUri.startsWith("data:") || redirectUri.startsWith("vbscript:") || redirectUri.startsWith("file:") || redirectUri.startsWith("mailto:") || redirectUri.startsWith("blob:")) {
|
|
1225
1225
|
throw new Error("Invalid redirect URI");
|
|
1226
1226
|
}
|
|
1227
1227
|
if (responseType === "token" && !this.provider.options.allowImplicitFlow) {
|