Displays a browser window to clear captcha when saving attachments. (#3526)
- Currently enabled only for ScienceDirect. Can be enabled via a whitelist - Matches the HiddenBrowser loaded HTML page for a captcha element. If the captcha element class changes, this will break (but the alternative is potentially displaying a captcha clearing window when something else that is not a captcha guard is loaded). - Captcha clear timeout for 60s. - Doesn't automatically switch focus back to the browser which intiated the item save via the Connector. - Stores the cookies used to clear the captcha for future saves from the same domain. Discards Connector supplied User Agent, since CF bot detector checks UA header against actual UA behavior like TLS handshake and if the UA acts different to what it's supposed to, the bot challenge is not cleared. Other changes: - Adjusted the cookie sandbox to allow multiple cookie sandboxes to be active (and simplified some legacy code that was meant to cover a bug in old FX codebase). - HiddenBrowser API changed to be Object oriented, translator tester in the translate repo will need to be updated after a merge (have the change ready). - Improved Connector Server attachment progress handling
This commit is contained in:
parent
c9b4daf152
commit
8b77c96e97
16 changed files with 607 additions and 342 deletions
|
@ -454,6 +454,7 @@ describe("Connector Server", function () {
|
|||
assert.lengthOf(response.items, 1);
|
||||
let item = response.items[0];
|
||||
if (item.attachments.length) {
|
||||
await Zotero.Promise.delay(10);
|
||||
let attachments = item.attachments;
|
||||
assert.lengthOf(attachments, 1);
|
||||
let attachment = attachments[0];
|
||||
|
@ -483,7 +484,6 @@ describe("Connector Server", function () {
|
|||
continue;
|
||||
}
|
||||
}
|
||||
await Zotero.Promise.delay(10);
|
||||
}
|
||||
|
||||
// Legacy endpoint should show 100
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue