-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix OAuth2 Event Trigger #28345
Fix OAuth2 Event Trigger #28345
Conversation
Event was triggered on storage selection if code={something} was present in URL
apps/files_external/js/oauth2.js
Outdated
@@ -27,7 +27,7 @@ $(document).ready(function() { | |||
params[key] = value; | |||
}); | |||
|
|||
if (params['code'] !== undefined) { | |||
if (params['code'] !== undefined && client_id != '' && client_secret != '') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please always use strict equality: ===
or !==
in Javascript to avoid surprises.
I recommend to use JSLint or JSHint which would catch these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I generally go with strict checking but in this case I went with loose checking because I just wanted to check whether the variable client_id and client_secret were having some value
like if (client_id && client_secret) { // do something }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay will do this right now
@PVince81 I have added strict checking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 if you retested with the changes and it still works
Yes I retested with the changes. |
@Hemant-Mann awesome, thanks! |
@Hemant-Mann please backport to stable10 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This PR aims to fix a minor bug generated by the changes of #28179
Related Issue
#28179
Steps to Reproduce the Bug:
/owncloud/index.php/settings/admin?sectionid=storage&code=a
i.e. code={something} in the URL and reload the pageparams['code'] !== undefined
was metTypes of changes
Checklist: