Restore From Backup 3.63 Problems

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 22, 2023   (RSS)

By Dave - November 22, 2023

Hi Kenny, 

I can confirm that's a bug and we can recreate it locally.  As a workaround you can either enter admin info, which will be ignored, or apply this patch to /lib/admin_functions.php

Search for "isValidEmail" to find this block that starts around line 160, and remove the ! before the first empty.

    // New Installation
    if (!empty($_REQUEST['restoreFromBackup'])) {
      if (!$_REQUEST['adminFullname'])                 { alert("Please enter 'Admin Full Name'<br>\n"); }
      if     (!$_REQUEST['adminEmail'])                { alert("Please enter 'Admin Email'<br>\n"); }
      elseif (!isValidEmail($_REQUEST['adminEmail']))  { alert("Please enter a valid email for 'Admin Email' (Example: user@example.com)<br>\n"); }
      if (!$_REQUEST['adminUsername'])                 { alert("Please enter 'Admin Username'<br>\n"); }

      $passwordErrors = getNewPasswordErrors($_REQUEST['adminPassword1'], $_REQUEST['adminPassword2'], $_REQUEST['adminUsername']); // v2.52
      if ($passwordErrors)  { alert( nl2br(htmlencode($passwordErrors)) ); }
    }

So that this: 

    if (!empty($_REQUEST['restoreFromBackup'])) {

Becomes this:

    if (empty($_REQUEST['restoreFromBackup'])) {

Let me know if that works for you and thanks for reporting this! 

Dave Edis - Senior Developer
interactivetools.com