Added check for mtime to be integer#27615
Added check for mtime to be integer#27615virajparimi wants to merge 2 commits intoowncloud:masterfrom
Conversation
| } | ||
| } | ||
| else { | ||
| throw new BadRequest('expected mtime to be integer'); |
There was a problem hiding this comment.
=> "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: