-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix @ProtonMail captcha endpoint/iframe URL resolving logic, #443
All the available API entry points are https-based, so it's ok if we just hardcode the "https" scheme in the patches. The @ProtonMail captcha endpoint at the moment is only available for the https://mail.protonmail.com API entry point only though see #419. List of the available API entry points: - https://mail.protonmail.com - https://app.protonmail.ch - https://protonmailrmez3lotccipshtkleegetolb73fuirgj7r4o4vfu7ozyd.onion
- Loading branch information
Showing
4 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/packages/components/containers/api/humanVerification/Captcha.tsx b/packages/components/containers/api/humanVerification/Captcha.tsx | ||
index 1192f7a32..44a5bcf04 100644 | ||
--- a/packages/components/containers/api/humanVerification/Captcha.tsx | ||
+++ b/packages/components/containers/api/humanVerification/Captcha.tsx | ||
@@ -7,6 +7,10 @@ const getIframeUrl = (apiUrl: string, token: string) => { | ||
url.hostname = getRelativeApiHostname(url.hostname); | ||
url.pathname = '/core/v4/captcha'; | ||
url.searchParams.set('Token', token); | ||
+ // not really necessary for "apiUrl"-based logic | ||
+ // but it's better to patch it still so we get the patching error when the account/drive/calendar tags adopt the following change: | ||
+ // https://github.com/ProtonMail/WebClients/commit/fc43e8ddd0b79212119ebc05f053e6561c5e166f#diff-2debfe7bb7d7c2f9d2bba32af4e155d0885b324582ee8861e0d4bfe11985ebae commit | ||
+ url.protocol = "https:"; | ||
return url; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters