Tweak URL matching regexp to be more precise
Institutional login process goes through multiple pages, the URL regexp is tweaked to be more precise to ensure that no arbitrary URLs are matched while polling for the final URL with auth code.
This commit is contained in:
parent
d03c495563
commit
34d62426c3
1 changed files with 1 additions and 1 deletions
|
@ -857,7 +857,7 @@ var Zotero_File_Interface = new function() {
|
|||
|
||||
this.authenticateMendeleyOnlinePoll = function (win) {
|
||||
if (win && win[0] && win[0].location) {
|
||||
const matchResult = win[0].location.toString().match(/(?:\?|&)code=(.*?)(?:&|$)/i);
|
||||
const matchResult = win[0].location.toString().match(/mendeley_oauth_redirect.html(?:.*?)(?:\?|&)code=(.*?)(?:&|$)/i);
|
||||
if (matchResult) {
|
||||
const mendeleyCode = matchResult[1];
|
||||
Zotero.getMainWindow().setTimeout(() => this.showImportWizard({ mendeleyCode }), 0);
|
||||
|
|
Loading…
Reference in a new issue