-
Notifications
You must be signed in to change notification settings - Fork 285
Fix redirect in proxy controller with no referrer #1016
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
Conversation
Due to the strict typing, `parse_url` fails when a non-string value is passed. To prevent that, a `is_string` check is added. Additionally, the referrer is now read directly in the controller instead of injecting via the DI container. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
$this->clientService = $this->getMockBuilder('\OCP\Http\Client\IClientService')->getMock(); | ||
$this->request = $this->createMock([ | ||
IRequest::class, | ||
ArrayAccess::class, |
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.
This is an API issue in the server, will report this and/or prepare a PR. cc @rullzer as discussed.
It's not. I thought the ArrayAccess would make it possible to access server
value, but it's actually implemented via a magic getter.
For other parameters this is still an issue, but has no effect on this.
|
IRequest exports the server values as magic read-only property and not via the array access. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
My bad. The |
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.
sure
Due to the strict typing,
parse_url
fails when a non-string value is passed.To prevent that, a
is_string
check is added. Additionally, the referrer isnow read directly in the controller instead of injecting via the DI container.
Fixes https://sentry.io/share/issue/83a7268d63f145eca3d7f4640dd26636/