joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[4.4] Correct file size validation for Media component

Open Fedik opened this issue 1 year ago • 8 comments

Pull Request for Issue https://github.com/joomla/joomla-cms/issues/43387 . Alternative to https://github.com/joomla/joomla-cms/pull/43904

Summary of Changes

Fix media manager ApiController to check actual file size, instead of POST size.

Testing Instructions

Please follow #43387

Actual result BEFORE applying this Pull Request

False error

Expected result AFTER applying this Pull Request

No false error

Link to documentations

Please select:

  • [ ] Documentation link for docs.joomla.org:
  • [x] No documentation changes for docs.joomla.org needed
  • [ ] Pull Request link for manual.joomla.org:
  • [x] No documentation changes for manual.joomla.org needed

Fedik avatar Aug 11 '24 10:08 Fedik

I have tested this item :white_check_mark: successfully on 883539f045f1fb1d44277021a231ef86a0692759


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43906.

brianteeman avatar Aug 11 '24 11:08 brianteeman

Followed the instructions - and got the expected error message.

After applying the Patch, I got: The patch could not be applied because it conflicts with a previously applied patch: administrator/components/com_media/src/Controller/ApiController.php


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43906.

ChristineWk avatar Aug 11 '24 17:08 ChristineWk

Followed the instructions - and got the expected error message.

After applying the Patch, I got: The patch could not be applied because it conflicts with a previously applied patch: administrator/components/com_media/src/Controller/ApiController.php This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43906.

Please make sure you don't have other patches applied.

Quy avatar Aug 11 '24 19:08 Quy

tks @Quy. If I had applied other patches, I wouldn't have been able to "fetch". Because then a different message would appear after fetch data. I'll check again.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43906.

ChristineWk avatar Aug 11 '24 19:08 ChristineWk

As a test I also tried a different pr (patch). This one was displayed. I tried again, unfortunately I now have error 500 (backend) Frontend OK. So I have to pass now .....


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43906.

ChristineWk avatar Aug 11 '24 20:08 ChristineWk

So, I was able to clear the 500 error. It was a MySQL issue. After "fetch data" I got the above message again. So I clicked "Reset" and everything was fine again.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43906.

ChristineWk avatar Aug 12 '24 16:08 ChristineWk

I have tested this item :white_check_mark: successfully on 883539f045f1fb1d44277021a231ef86a0692759


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43906.

ChristineWk avatar Aug 12 '24 16:08 ChristineWk

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43906.

alikon avatar Aug 12 '24 16:08 alikon

Thank you!

MacJoom avatar Sep 12 '24 09:09 MacJoom