Meaningfull error for copy method#71
Conversation
|
iirc we have parts in the cms which directly outputs the error message, writing the information into the message would be a information disclosure security issue. Also the Exception it self is wrong there should be an own exception for every issue, which might could hold the additonal information. |
You do understand its the same info that is already used in that method right? |
@artur-stepien The full paths Line 118 in fe6edb9 |
These are not full paths. When they end up in a flash message they have [ROOT] and [TMP] placeholders. |
@artur-stepien As @HLeithner has already mentioned, this might not be the case in every scenario. That's why I suggest you change both lines, i.e. change line 127 to and line 136 to @HLeithner You wrote:
I think that would be a bigger clean up to be done with a separate PR as we have that at several other places, too. |
|
@artur-stepien @HLeithner I just see that the filesystem exception already calls And that method removes every occurrence of the Joomla root or the PHP temp folder from the exception message. So I have to correct my previous comments, it is not necessary to wrap the |
Currently if the the copy method fails, it gives no details about what paths where provided as the parameters. It makes it had to debug (especially installer errors). This adds a proper source/destination details like in the stream copy above.
Summary of Changes
Expands the error message.
Testing Instructions
Try to install an extension with files added in the extension manifest but not in the zip file.
Documentation Changes Required
No