-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle trying authorization with client credentials (#1402)
* Handle trying authorization with client credentials When trying to start a new authorization for an application with grant flow 'client_credentials' (which also has redirect_uri nil), the following error occurs: NoMethodError: undefined method `split' for nil:NilClass lib/doorkeeper/oauth/helpers/uri_checker.rb:66 valid_for_authorization? lib/doorkeeper/oauth/pre_authorization.rb:89 validate_redirect_uri lib/doorkeeper/validations.rb:13 block in validate lib/doorkeeper/validations.rb:12 each lib/doorkeeper/validations.rb:12 validate lib/doorkeeper/validations.rb:19 valid? lib/doorkeeper/oauth/pre_authorization.rb:32 authorizable? app/controllers/doorkeeper/authorizations_controller.rb:8 new Moving the validation for supporting grant flows up, prevents this error from happening (and shows an error message to the user, instead of a 500 Internal Server Error). * [ci skip][ga skip] Reference #1402 fix
- Loading branch information
Bob Forma
authored
Apr 30, 2020
1 parent
25dba97
commit ca3b644
Showing
3 changed files
with
14 additions
and
1 deletion.
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
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