jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.x - (This is the current version!) => Bugs! => Topic started by: baba on 29.09.2026 09:49:33

Title: Bug in restore functionality - JDownloads Version 4.1.7 Stable - Fix included!
Post by: baba on 29.09.2026 09:49:33
Hello,
i stumbled upon a restore bug in actual version! The issue was caused by RestoreController.php of JDownloads.

With the unfixed version i always get:
An error has occurred.
0 Joomla\Filesystem\File::upload: File not uploaded for security reasons!

After some investigations i found the reason was in RestoreController.php

Failed code:
   240               // save it in temp folder
   241               $upload_path = $restore_dir . '/' . File::makeSafe($file['name']);
   242   
   243               if (!File::upload($file['tmp_name'], $upload_path)){
   244                   $app->enqueueMessage(Text::_('COM_JDOWNLOADS_RESTORE_MSG_STORE_ERROR'), 'error');
   245                   $app->redirect(ROUTE::_('index.php?option=com_jdownloads', false));
   246   
   247                   return false;
   248               }

Fixed code:
  240               // save it in temp folder
   241               $upload_path = $restore_dir . '/' . File::makeSafe($file['name']);
   242   
   243               if (!File::upload($file['tmp_name'], $upload_path, false, true)){
   244                   $app->enqueueMessage(Text::_('COM_JDOWNLOADS_RESTORE_MSG_STORE_ERROR'), 'error');
   245                   $app->redirect(ROUTE::_('index.php?option=com_jdownloads', false));
   246   
   247                   return false;
   248               }

So line 243 had to be changed! After that the restore worked fine.  8)

Title: Re: Bug in restore functionality - JDownloads Version 4.1.7 Stable - Fix included!
Post by: ColinM on 30.09.2026 11:36:30
Hi
Thanks for finding bug.
Just for completeness could you please advise version of Joomla and of jDownloads
Thanks
ColinM
Title: Re: Bug in restore functionality - JDownloads Version 4.1.7 Stable - Fix included!
Post by: baba on 01.10.2026 00:44:16
Hey Colin,

Thanks for reply! The versions in scope are:

Joomla: 6.1.4
JDownloads: 4.1.7 Stable

Cheers
Baba