User tests: Successful: Unsuccessful:
Apply additional escaping to com_media folder paths in template over ride.
As discussed by @joomla/security
With thanks to Herman Peeren
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Templates (site) |
Labels |
Added:
?
|
Category | Front End Templates (site) | ⇒ | Administration Templates (admin) Front End Templates (site) |
Going by similar code:
Also in the URL: &rm[]=<?php echo $this->escape($this->_tmp_video->name); ?>
and rel="<?php echo $this->escape($this->_tmp_video->name); ?>">
In fact that is never used, none of these files are ever used.
These are the only ones ever used.
echo $this->loadTemplate('up'),
$this->loadTemplate('folders'),
$this->loadTemplate('docs'),
$this->loadTemplate('videos'),
$this->loadTemplate('imgs');
The doc video and folder files contain very old code and generate PHP issues when included too - best those get deleted. Will fork a PR for that. - Done - see #20630
I have tested this item
Create a media custom field.
Edit an article on the backend/frontend.
Under the Fields tab, click on the Select button of the media field.
@Quy test with and -out PR i can select an Image for an Article - test on backend.
Please have a look at http://wohlkoenig.joomla.com/index.php
Now i'm on Github and see its about docs and Video, will have a look.
I have tested this item
After changing allowed Types (mp4, video/mp4) in Media > Option Video-Upload was successfully:
Select Video in Article-Field doesn't work as Video isn't shown:
@franz-wohlkoenig and so what EXACTLY was the result of your test? just saying I have tested this item unsuccessfully is not enough
Thats why i wrote before "Description follows".
Cause i had to mark test in Tracker, switch to Github, create Screenshots and write in English which is not my native language.
This takes its Time, please be patient with an elderly Man.
You will not see a difference in functionality, but only the markup.
Let's create a folder a&b
inside the images
folder either via FTP or directly if testing locally.
Edit an article.
Click the Image
button in the editor.
View the page source of the modal.
Without PR, the folder name is a&b
With PR, folder name is a&b
With the other change, apply escaping to the URL of the folder name on the front end to be consistent with the back end.
@franz-wohlkoenig You are testing something that this PR is not actually changing.
What you are seeing is EXPECTED.
You are clicking on the IMAGE button in the WYSIWYG Editor on the frontend, this loads a url in an iframe of: http://127.0.0.1:1025/index.php?option=com_media&view=imagesList&tmpl=component&folder=&asset=61&author=838
This runs this code
and as you can see mp4 extension files are added to a VIDEOS array and not an IMAGES array as used on and therefore what you are seeing is THE CORRECT AND EXPECTED RESULT and nothing to do with this proposed PR.Category | Front End Templates (site) Administration Templates (admin) | ⇒ | Administration com_media Templates (admin) Front End Templates (site) |
@PhilETaylor Thanks for Explanation, what this Pull Request is about to test. Can you please adopt this in first Comment so Tester gets easier to understand?
You have to view the page source of the modal and not with web developer inspector.
I have tested this item
Thank @Quy
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-06-18 02:54:31 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
Here too:
https://github.com/PhilETaylor/joomla-cms/blob/4a611a4aef03976b4107ef3e5c1d88ad2d32a42d/administrator/components/com_media/views/medialist/tmpl/details_folder.php#L31-L32