News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Bug in restore functionality - JDownloads Version 4.1.7 Stable - Fix included!

Started by baba, 29.09.2026 09:49:33

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

baba

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)

  •  

ColinM

Hi
Thanks for finding bug.
Just for completeness could you please advise version of Joomla and of jDownloads
Thanks
ColinM
Colin M
  •  

baba

Hey Colin,

Thanks for reply! The versions in scope are:

Joomla: 6.1.4
JDownloads: 4.1.7 Stable

Cheers
Baba
  •