-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
added method in OAuth for checking redirect url #392
base: 3.5.x
Are you sure you want to change the base?
added method in OAuth for checking redirect url #392
Conversation
app/library/Github/OAuth.php
Outdated
* | ||
* @return string | ||
*/ | ||
protected function getRedirectGitPath($url, $endSlash = true) |
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.
@sergeysviridenko Where is this method used? :)
699e62f
to
16ad361
Compare
e3cf11e
to
3a7d61f
Compare
app/library/Github/OAuth.php
Outdated
protected function checkRedirectGitPath($url) | ||
{ | ||
if (!filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED | | ||
FILTER_FLAG_PATH_REQUIRED)) { |
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.
$validationFlags = FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED | FILTER_FLAG_PATH_REQUIRED;
if (!filter_var($url, FILTER_VALIDATE_URL, $validationFlags)) {
// ...
}
|
||
namespace Phosphorum\Exception; | ||
|
||
class UrlException extends \LogicException |
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.
InvalidCalbackUrlException
app/library/Github/OAuth.php
Outdated
} | ||
|
||
if (stristr($url, '://', true) != $this->request->getScheme()) { | ||
$errorMessage = 'HyperText Protocol in your application and in your setting file are different. '; |
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.
The same protocol should be used for the authorization callback URL and forum settings.
3a7d61f
to
e8525c2
Compare
Hello!
In raising this pull request, I confirm the following (please check boxes):
Small description of change:
Added method for checking
GITHUB_REDIRECT_URI
param from Github authorizationThanks