? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
7 Feb 2021

Pull Request for Issue #31920 and #31921

Summary of Changes

This PR adds some validation to Path to Temp Folder and Path to Log Folder to make sure it is valid and writable before saving to Global Configuration. In case the folder is not writable, a warning will be displayed and default folder will be used instead (same with how we handle Path to Cache Folder)

Testing Instructions

  1. Go to System -> Global Configuration
  2. Try to enter wrong path to Path to Temp Folder and Path to Log Folder
  3. Before path: These wrong paths are saved
  4. After patch: There are warning displayed and default paths are saved.
avatar joomdonation joomdonation - open - 7 Feb 2021
avatar joomdonation joomdonation - change - 7 Feb 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Feb 2021
Category Administration com_config Language & Strings
avatar joomdonation joomdonation - change - 7 Feb 2021
Title
Validate Path to Temp and Log Folder
[4.0] Validate Path to Temp and Log Folder
avatar joomdonation joomdonation - edited - 7 Feb 2021
avatar toivo toivo - test_item - 8 Feb 2021 - Tested successfully
avatar toivo
toivo - comment - 8 Feb 2021

I have tested this item successfully on 6c36f00

Tested successfully in Beta8-dev of 8 February using PHP 8.0.1 in Wampserver 3.2.4.


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

avatar Quy Quy - test_item - 9 Feb 2021 - Tested successfully
avatar Quy
Quy - comment - 9 Feb 2021

I have tested this item successfully on 6c36f00


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

avatar Quy Quy - change - 9 Feb 2021
Status Pending Ready to Commit
Labels Added: ?
avatar Quy
Quy - comment - 9 Feb 2021

RTC


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

avatar laoneo
laoneo - comment - 12 Feb 2021

I would not merge it as we really should avoid code which suppresses errors.

avatar Quy Quy - change - 12 Feb 2021
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 13 Feb 2021

I would not merge it as we really should avoid code which suppresses errors.

@laoneo Would it be ok if @joomdonation follows your recommendation above ? Or does it need more changes than that?

avatar laoneo
laoneo - comment - 13 Feb 2021

Sure

avatar richard67
richard67 - comment - 13 Feb 2021

Sure

@laoneo Sure what? 1st "Would it be ok if ..." or 2nd "Or does it need more ..." of my questions?

avatar laoneo
laoneo - comment - 13 Feb 2021

Sorry hit to early enter... Replacing the surpressing with proper condition checks should be fine. Not on a pc right now... But there are for sure better ways to do it.

avatar joomdonation joomdonation - change - 18 Feb 2021
Labels Added: ?
avatar joomdonation
joomdonation - comment - 23 Feb 2021

@toivo @Quy Could you please help testing again when you have time? Thanks !

avatar himanshu007-creator himanshu007-creator - test_item - 23 Feb 2021 - Tested successfully
avatar himanshu007-creator
himanshu007-creator - comment - 23 Feb 2021

I have tested this item successfully on ad578cb

This patch worked as expected, raising warnings for wrong paths.REFER HERE


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

avatar laoneo laoneo - change - 24 Feb 2021
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-02-24 04:33:36
Closed_By laoneo
Labels Added: ?
Removed: ?
avatar laoneo laoneo - close - 24 Feb 2021
avatar laoneo laoneo - merge - 24 Feb 2021
avatar laoneo
laoneo - comment - 24 Feb 2021

Thanks!

avatar laoneo
laoneo - comment - 24 Feb 2021

Merged it as the only things which has changed since the two successfull tests was that opendir was replaced by is_dir and is_writable.

Add a Comment

Login with GitHub to post a comment