42888[BUGFIX] Handling of uploaded files not within open_basedir
Commit message
Review
-
Code review CR +2
- Morton Jonuschat +2
- Wouter Wolters +1
- Markus Sommer +1
- Frank Nägler +1
-
Verified V +2
- Morton Jonuschat +2
- Markus Sommer +1
Issues 1
Files 1
Review log 15
-
Bernhard Kraft uploaded patch set 1 08/27/15, 12:14
-
Benni Mack uploaded patch set 2 10/01/15, 13:22
-
Benni Mack voted on patch set 2 CR +1 10/08/15, 20:28
-
Oliver Hader uploaded patch set 3 10/08/15, 23:53
-
Morton Jonuschat uploaded patch set 4 11/13/15, 14:38
-
Morton Jonuschat voted on patch set 4 CR +1 V +1 11/13/15, 14:39
-
Frank Nägler commented on patch set 4 CR -1 11/13/15, 16:49
dislike the @ operator... suppress the error is not a solution. If I understand it correctly, this is a failure of a misconfigured system. From my point of view, it is absolut correct to get an exception here. -
Morton Jonuschat commented on patch set 4 CR 0 V 0 11/13/15, 16:54
Sorry, but it's no a misconfigured system. It's perfectly valid for the webserver to store the (temporary) uploaded file in a directory where the user has no access. Thats why there is move_uploaded_file(). The comment in the PHP docs says: move_uploaded_file() is both safe mode and open_basedir aware. However, restrictions are placed only on the destination path as to allow the moving of uploaded files in which filename may conflict with such restrictions. move_uploaded_file() ensures the safety of this operation by allowing only those files uploaded through PHP to be moved. Switching the conditions around might avoid the open_basedir warning for uploaded files, will try and push a new patchset if it works out. -
Morton Jonuschat uploaded patch set 5 11/13/15, 17:02
-
Morton Jonuschat commented on patch set 5 CR +1 V +1 11/13/15, 17:03
Check for uploaded files first as PHP will then not process the file_exists call in case of uploaded files. This avoids the need of silencing the open_basedir warning. -
Frank Nägler commented on patch set 5 CR +1 11/13/15, 17:07
thx, looks much better :) -
Wouter Wolters voted on patch set 5 CR +1 11/13/15, 19:01
-
Markus Sommer voted on patch set 5 CR +1 V +1 11/13/15, 19:47
-
Morton Jonuschat voted on patch set 5 CR +2 V +2 11/13/15, 19:50
-
Gerrit merged patch set 5 11/13/15, 19:51