-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Added check for mtime to be integer #27615
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
| } | ||
| } | ||
| else { | ||
| throw new BadRequest('expected mtime to be integer'); |
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.
=> "X-OC-MTime header must be an integer" would be a bit clearer
|
Code looks good otherwise, thanks ! |
|
@PVince81 done |
|
Please test with the desktop client, apparently the value is not recognized as int by ``' // => eval: is_int($request->server['HTTP_X_OC_MTIME']) |
|
Ahh, so the $request->server['HTTP_X_OC_MTIME'] is a string and not an integer. Okay, one possible solution is to use |
|
|
|
the is_int approach has also the problem that negative values would be accepted |
|
any update ? |
|
@PVince81 Hi, I have been busy with my End Semester Exams. Will work on it once they get over by this weekend. Sorry for the delay caused. |
|
Any update here, or can I review? |
|
here is an alternative approach #28066 don't throw any errors but simply make sure the value is legal |
|
This one can be closed since the other approach has been merged right? @PVince81 |
|
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
Added check in File.php of dav app in order to ensure that
$request->server['HTTP_X_OC_MTIME']is an integer. If it is not then throws aBadRequestexception.Related Issue
#27437
Motivation and Context
How Has This Been Tested?
Have not tested it thoroughly.
Chrome and Ubuntu 14.04
Types of changes
Checklist: