-
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
In case of exception we return an html page in case the client is a b… #23557
Conversation
By analyzing the blame information on this pull request, we identified @LukasReschke, @icewind1991, @PVince81 and @DeepDiver1975 to be potential reviewers |
if ($request->getMethod() !== 'GET') { | ||
return false; | ||
} | ||
return $request->isUserAgent([Request::USER_AGENT_IE_8]); |
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.
@LukasReschke this is where I need all the mighty regex 🙈
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.
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.
🙇
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.
In 9.0 we don't support IE8 any more 🔥
Only IE >= 9
See #15567 (comment)
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.
Wow, nicely done! |
|
Haha, maybe another trick would be to produce a XSLT file with style information ? 😛 |
|
… I'm still writing that magical Regex 😉 … |
@LukasReschke has to add his |
@@ -333,7 +333,7 @@ public static function printErrorPage( $error_msg, $hint = '' ) { | |||
* print error page using Exception details | |||
* @param Exception $exception | |||
*/ | |||
public static function printExceptionErrorPage($exception) { | |||
public static function printExceptionErrorPage($exception, $fetchPage = false) { |
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.
PHPDoc 😉
Request::USER_AGENT_MS_EDGE, | ||
Request::USER_AGENT_CHROME, | ||
Request::USER_AGENT_FIREFOX, | ||
Request::USER_AGENT_SAFARI, |
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.
Too bad we can't just rely on "Accept" headers
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.
Yep. Clients are fun 🙈
Once we have tokens this will be easy though since we know where the token belongs to.
We're almost there. The page says "Internal Server Error". |
how are you triggering the error? |
See #23557 (comment) It has the Webdav download link with a non-existing file. |
Just open "http://localhost/owncloud/remote.php/webdav/unexist.txt" in Chromium 48 (after being logged in) |
Okay - the real http status code is 404 and the explicit exception message is listed as well. I simply used out exception error page which always prints 'internal server error' |
ah - yes - the excption details are only displayed in debug mode. What was the behavior with the ajax download? Which page did we display there? |
I see it explicitly renders the 404 template .... |
I'm also getting a permanent reload loop here - due to NotAuthenticated |
Okay - special 404 template added - any other cases we want to handle different? |
403 in case it's blocked by the firewall or the file could not be decrypted, 423 if the file is locked. Do these have to be handled one by one ? |
Let me have a quick test with encryption |
Tried with encryption and on stable8.2 the download runs forever... no page displayed 😦 |
I thought we could just take whatever status code we have + exception name + exception description (if any) from the XML and display it as is in a page. But not "Internal Server Error". |
Firewall blocking also shows "Internal Server Error" instead of "Forbidden" on this PR. |
I'll take care of that .... |
let me squash that stuff a bit and then we can merge @karlitschek do we want to backport this? |
agreed. please backport :+1 |
e4159b1
to
95820fb
Compare
THX - here we go #23574 |
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. |
…rowser
@PVince81 @LukasReschke the plugin approach to fix #23500