Plugin Directory

Changeset 3809656


Ignore:
Timestamp:
11/18/2026 03:32:10 PM (less than one hour ago)
Author:
backupino
Message:

Update to version 1.1.0 from GitHub

Location:
backupino
Files:
2 added
4 deleted
33 edited
1 copied

Legend:

Unmodified
Added
Removed
  • backupino/assets/icon.svg

    r3800361 r3809656  
    4343
    4444  <!-- Breathing Core Halo -->
    45   <circle cx="128" cy="128" r="96" fill="url(#coreGlow)" opacity="0.85"/>
     45  <circle cx="128" cy="128" r="96" fill="url(#coreGlow)">
     46    <animate attributeName="r" values="88;102;88" dur="3.2s" repeatCount="indefinite"/>
     47    <animate attributeName="opacity" values="0.75;1;0.75" dur="3.2s" repeatCount="indefinite"/>
     48  </circle>
    4649
    4750  <!-- Outer Resumable Checkpoint Track -->
    … …  
    5154  <g>
    5255    <circle cx="128" cy="128" r="74" fill="none" stroke="#38bdf8" stroke-opacity="0.22" stroke-width="2.5" stroke-dasharray="16 26" stroke-linecap="round"/>
     56    <animateTransform attributeName="transform" type="rotate" from="360 128 128" to="0 128 128" dur="9s" repeatCount="indefinite"/>
    5357  </g>
    5458
    55   <!-- Primary Backup & Restore Orbit -->
     59  <!-- Primary Rotating Backup & Restore Orbit -->
    5660  <g>
    5761    <!-- Concentric 231-deg Orbital Sweep on r=94 -->
    … …  
    5963    <!-- Tangential Arrowhead -->
    6064    <path d="M 141 34 L 118 21 L 124 34 L 118 47 Z" fill="#e0f2fe"/>
    61     <!-- Checkpoint Data Node -->
    62     <circle cx="217.4" cy="98.95" r="4.5" fill="#38bdf8" opacity="0.9"/>
     65    <!-- Pulsing Checkpoint Data Node -->
     66    <circle cx="217.4" cy="98.95" r="4.5" fill="#38bdf8">
     67      <animate attributeName="opacity" values="0.35;1;0.35" dur="1.6s" repeatCount="indefinite"/>
     68    </circle>
     69    <animateTransform attributeName="transform" type="rotate" from="0 128 128" to="360 128 128" dur="3.2s" repeatCount="indefinite"/>
    6370  </g>
    6471
    … …  
    8895
    8996    <!-- Fast-Recovery Stem Chevron -->
    90     <polygon points="88,115 108,128 88,141" fill="url(#boltGrad)" opacity="0.9"/>
     97    <polygon points="88,115 108,128 88,141" fill="url(#boltGrad)">
     98      <animate attributeName="opacity" values="0.7;1;0.7" dur="1.6s" repeatCount="indefinite"/>
     99    </polygon>
    91100  </g>
    92101</svg>
  • backupino/tags/1.1.0/assets/css/installer.css

    r3800274 r3809656  
    253253        font-size: 12.5px;
    254254}
     255.admin-box {
     256        background: #f8fafc;
     257        border: 1px solid var(--line);
     258        border-radius: 8px;
     259        padding: 12px 14px;
     260        margin-top: 14px;
     261}
     262.pass-wrap {
     263        position: relative;
     264        display: flex;
     265        align-items: center;
     266}
     267.pass-wrap input {
     268        padding-inline-end: 65px;
     269}
     270.pass-toggle-btn {
     271        position: absolute;
     272        inset-inline-end: 6px;
     273        top: 50%;
     274        transform: translateY(-50%);
     275        margin: 0;
     276        padding: 4px 10px;
     277        font-size: 11px;
     278        background: #e2e8f0;
     279        color: #334155;
     280        border-radius: 4px;
     281        border: 0;
     282        cursor: pointer;
     283}
     284.pass-toggle-btn:hover {
     285        background: #cbd5e1;
     286}
  • backupino/tags/1.1.0/assets/js/installer.js

    r3800274 r3809656  
    3737                        open_admin: "Open wp-login.php →",
    3838                        empty_db_lbl: "Empty existing database tables before import (Recommended)",
     39                        create_admin_opt: "Create a new WordPress Administrator account (Optional)",
     40                        admin_user_lbl: "Administrator Username",
     41                        admin_email_lbl: "Administrator Email",
     42                        admin_pass_lbl: "Administrator Password",
     43                        admin_created_title: "✓ New Administrator Account Created:",
     44                        show_btn: "Show",
     45                        hide_btn: "Hide",
    3946                        ext_files: "Extracting files",
    4047                        imp_db: "Importing database",
    … …  
    7481                        open_admin: "ورود مستقیم به wp-login.php ←",
    7582                        empty_db_lbl: "پاک‌سازی و حذف جداول موجود در دیتابیس قبل از درون‌ریزی (پیشنهادی)",
     83                        create_admin_opt: "ایجاد حساب کاربری مدیر کل جدید در وردپرس (اختیاری)",
     84                        admin_user_lbl: "نام کاربری مدیر",
     85                        admin_email_lbl: "ایمیل مدیر",
     86                        admin_pass_lbl: "رمز عبور مدیر",
     87                        admin_created_title: "✓ حساب کاربری مدیر کل جدید با موفقیت ایجاد شد:",
     88                        show_btn: "نمایش",
     89                        hide_btn: "مخفی",
    7690                        ext_files: "در حال استخراج فایل‌ها",
    7791                        imp_db: "در حال درون‌ریزی دیتابیس",
    … …  
    153167        var title = document.getElementById("progress-title");
    154168        var busy = false;
     169        var completed = false;
     170        var runHandle = "";
     171
     172        function sendAbort(useBeacon) {
     173                var token = getToken();
     174                if (!token) { return; }
     175                var fields = { action: "abort", token: token };
     176                if (runHandle) {
     177                        fields.run_handle = runHandle;
     178                }
     179                var body = new URLSearchParams(fields);
     180                runHandle = "";
     181                if (useBeacon && typeof navigator !== "undefined" && typeof navigator.sendBeacon === "function") {
     182                        try {
     183                                navigator.sendBeacon(window.location.pathname, body);
     184                                return;
     185                        } catch (e) {}
     186                }
     187                try {
     188                        fetch(window.location.pathname, {
     189                                method: "POST",
     190                                body: body,
     191                                credentials: "same-origin",
     192                                keepalive: true,
     193                                headers: { "Content-Type": "application/x-www-form-urlencoded" }
     194                        }).catch(function () {});
     195                } catch (e) {}
     196        }
     197
     198        window.addEventListener("pagehide", function () {
     199                if (busy && !completed) {
     200                        sendAbort(true);
     201                }
     202        });
    155203
    156204        function api(action, data) {
    157                 var params = Object.assign({ action: action, token: getToken() }, data || {});
     205                var base = { action: action, token: getToken() };
     206                if (runHandle) {
     207                        base.run_handle = runHandle;
     208                }
     209                var params = Object.assign(base, data || {});
    158210                var body = new URLSearchParams(params);
    159211                return fetch(window.location.pathname, {
    … …  
    187239
    188240        function fail(message, field) {
    189                 var el = document.getElementById(field || "error3");
     241                var targetField = field || "error3";
     242                var el = document.getElementById(targetField);
    190243                if (el) {
    191244                        el.textContent = message;
    … …  
    199252                if (bar) {
    200253                        bar.style.background = "#dc2626";
     254                }
     255                if (targetField === "error3" && !completed) {
     256                        sendAbort(false);
    201257                }
    202258                busy = false;
    … …  
    278334                                prefix: getVal("prefix"),
    279335                                new_url: getVal("new_url"),
    280                                 empty_db: getChecked("empty_db")
     336                                empty_db: getChecked("empty_db"),
     337                                create_admin: getChecked("create_admin"),
     338                                admin_user: getVal("admin_user"),
     339                                admin_email: getVal("admin_email"),
     340                                admin_pass: getVal("admin_pass")
    281341                        };
    282342
    … …  
    288348                                        return;
    289349                                }
     350                                if (res.run_handle) {
     351                                        runHandle = String(res.run_handle);
     352                                }
     353                                var dbPassEl = document.getElementById("db_pass");
     354                                if (dbPassEl) { dbPassEl.value = ""; }
     355                                var adminPassEl = document.getElementById("admin_pass");
     356                                if (adminPassEl) { adminPassEl.value = ""; }
    290357                                show("step3");
    291358                                updateStepNav(3);
    … …  
    305372                                                        api("config").then(function (final) {
    306373                                                                if (!final.ok) { fail(final.error || "Configuration failed."); return; }
     374                                                                completed = true;
     375                                                                busy = false;
    307376                                                                show("step4");
    308377                                                                var siteUrl = final.url || "";
    … …  
    317386                                                                var doneUrlEl = document.getElementById("done-url");
    318387                                                                if (doneUrlEl) { doneUrlEl.textContent = siteUrl; }
    319                                                         });
     388                                                                if (final.admin_created) {
     389                                                                        var adminBox = document.getElementById("admin-created-box");
     390                                                                        var adminName = document.getElementById("admin-created-name");
     391                                                                        if (adminBox && adminName) {
     392                                                                                adminName.textContent = final.admin_created;
     393                                                                                adminBox.classList.remove("hidden");
     394                                                                        }
     395                                                                }
     396                                                        }).catch(function (err) { fail(String(err)); });
    320397                                                });
    321398                                        });
    … …  
    334411                        api("cleanup").then(function (res) {
    335412                                if (!res.ok) { fail(res.error || "Cleanup failed.", "error4"); btn.disabled = false; return; }
     413                                runHandle = "";
    336414                                btn.textContent = (I18N[currentLang] && I18N[currentLang].cleaned) ? I18N[currentLang].cleaned : "Installer files deleted.";
    337415                                window.setTimeout(function () {
    … …  
    344422                });
    345423        }
     424        var createAdminCb = document.getElementById("create_admin");
     425        var adminFields = document.getElementById("admin-fields");
     426        if (createAdminCb && adminFields) {
     427                createAdminCb.addEventListener("change", function () {
     428                        if (createAdminCb.checked) {
     429                                adminFields.classList.remove("hidden");
     430                        } else {
     431                                adminFields.classList.add("hidden");
     432                        }
     433                });
     434        }
     435
     436        var togglePassBtn = document.getElementById("toggle_admin_pass");
     437        var adminPassInput = document.getElementById("admin_pass");
     438        if (togglePassBtn && adminPassInput) {
     439                togglePassBtn.addEventListener("click", function () {
     440                        if (adminPassInput.type === "password") {
     441                                adminPassInput.type = "text";
     442                                togglePassBtn.textContent = (I18N[currentLang] && I18N[currentLang].hide_btn) ? I18N[currentLang].hide_btn : "Hide";
     443                        } else {
     444                                adminPassInput.type = "password";
     445                                togglePassBtn.textContent = (I18N[currentLang] && I18N[currentLang].show_btn) ? I18N[currentLang].show_btn : "Show";
     446                        }
     447                });
     448        }
    346449})();
  • backupino/tags/1.1.0/backupino.php

    r3800363 r3809656  
    44 * Plugin URI:        https://github.com/Backupino/documents
    55 * Description:       Fast, resumable WordPress backups, cloning and migration with a self-contained installer.
    6  * Version:           1.0.5
     6 * Version:           1.1.0
    77 * Requires at least: 6.0
    88 * Requires PHP:      7.4
    … …  
    1919defined( 'ABSPATH' ) || exit;
    2020
    21 define( 'BACKUPINO_VERSION', '1.0.5' );
     21define( 'BACKUPINO_VERSION', '1.1.0' );
    2222define( 'BACKUPINO_FILE', __FILE__ );
    2323define( 'BACKUPINO_DIR', plugin_dir_path( __FILE__ ) );
  • backupino/tags/1.1.0/languages/backupino.pot

    r3800363 r3809656  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Backupino 1.0.5\n"
     5"Project-Id-Version: Backupino 1.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/backupino\n"
    7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    8 "Language-Team: LANGUAGE <LL@li.org>\n"
     7"Last-Translator: Backupino Team <support@backupino.com>\n"
     8"Language-Team: English <support@backupino.com>\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-11-13T12:22:16+00:00\n"
     12"POT-Creation-Date: 2026-11-18T13:11:27+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.12.0\n"
     14"X-Generator: Backupino i18n build tool\n"
    1515"X-Domain: backupino\n"
    1616
    17 #. Plugin Name of the plugin
    18 #. Author of the plugin
    19 #: backupino.php
    20 #: src/Admin/Admin.php:48
    21 #: templates/dashboard.php:34
    22 #: templates/settings.php:64
     17#: free/src/Backup/Stages/ScanStage.php:86
     18msgid "%1$s files found (%2$s)."
     19msgstr ""
     20
     21#: free/src/Backup/Stages/DatabaseStage.php:99
     22msgid "%1$s rows from %2$s tables (%3$s)."
     23msgstr ""
     24
     25#: free/backupino.php:1
     26msgid "%d message is waiting to be resent on the next scheduled run."
     27msgstr ""
     28
     29#: free/src/Notify/Notifier.php:241
     30msgid "%s messenger is not enabled or not fully configured."
     31msgstr ""
     32
     33#: free/templates/settings.php:681
     34msgid "100% privacy-compliant: zero tracking, zero telemetry, strictly optional notifications."
     35msgstr ""
     36
     37#: free/backupino.php:1
     38msgid "A new version of Backupino is available (%s)."
     39msgstr ""
     40
     41#: free/backupino.php:1
     42msgid "A valid administrator email address is required."
     43msgstr ""
     44
     45#: free/backupino.php:1
     46msgid "API token provided by Telegram @BotFather or Bale Bot platform."
     47msgstr ""
     48
     49#: free/templates/dashboard.php:305
     50msgid "Actions"
     51msgstr ""
     52
     53#: free/templates/settings.php:199
     54msgid "Active"
     55msgstr ""
     56
     57#: free/templates/settings.php:397
     58msgid "Add this directive inside your Nginx server { } block:"
     59msgstr ""
     60
     61#: free/templates/settings.php:576
     62msgid "Admin Login URL"
     63msgstr ""
     64
     65#: free/backupino.php:1
     66msgid "Administrator Email"
     67msgstr ""
     68
     69#: free/backupino.php:1
     70msgid "Administrator Password"
     71msgstr ""
     72
     73#: free/backupino.php:1
     74msgid "Administrator Username"
     75msgstr ""
     76
     77#: free/backupino.php:1
     78msgid "Administrator password is required."
     79msgstr ""
     80
     81#: free/backupino.php:1
     82msgid "Administrator username is required."
     83msgstr ""
     84
     85#: free/templates/settings.php:423
     86msgid "After adding the rule, test with `nginx -t` and reload Nginx. Authorized downloads through Backupino admin or the permanent download link continue to work normally through PHP."
     87msgstr ""
     88
     89#: free/backupino.php:1
     90msgid "Archive"
     91msgstr ""
     92
     93#: free/templates/settings.php:20
     94#: free/templates/settings.php:289
     95msgid "Archive & Exclusions"
     96msgstr ""
     97
     98#: free/src/Installer/Env.php:77
     99msgid "Archive checksum"
     100msgstr ""
     101
     102#: free/src/Installer/Env.php:70
     103msgid "Archive file"
     104msgstr ""
     105
     106#: free/src/Installer/Env.php:50
     107msgid "Archive support"
     108msgstr ""
     109
     110#: free/src/Backup/Stages/FilesStage.php:40
     111msgid "Archiving files"
     112msgstr ""
     113
     114#: free/templates/settings.php:609
     115msgid "Automatic recurring backups trigger via WordPress cron. In Persian locale, monthly schedules automatically align with the start of the Jalali month."
     116msgstr ""
     117
     118#: free/templates/settings.php:540
     119#: free/templates/settings.php:572
     120msgid "Available tags:"
     121msgstr ""
     122
     123#: free/backupino.php:1
     124msgid "Back to backups"
     125msgstr ""
     126
     127#: free/templates/settings.php:543
     128msgid "Backup Contents"
     129msgstr ""
     130
     131#: free/templates/settings.php:545
     132msgid "Backup Date"
     133msgstr ""
     134
     135#: free/templates/dashboard.php:409
     136msgid "Backup Details & Log"
     137msgstr ""
     138
     139#: free/src/Admin/Admin.php:116
     140msgid "Backup Job"
     141msgstr ""
     142
     143#: free/templates/settings.php:526
     144msgid "Backup Message Template"
     145msgstr ""
     146
     147#: free/templates/settings.php:544
     148msgid "Backup Size"
     149msgstr ""
     150
     151#: free/templates/settings.php:209
     152msgid "Backup Storage Destination"
     153msgstr ""
     154
     155#: free/backupino.php:1
     156msgid "Backup archives and standalone installers are stored locally in a secure, protected directory on your server."
     157msgstr ""
     158
     159#: free/templates/settings.php:335
     160msgid "Backup archives are stored locally on your server and served to administrators through Backupino authenticated download endpoints."
     161msgstr ""
     162
     163#: free/src/Admin/Admin.php:118
     164msgid "Backup cancelled."
     165msgstr ""
     166
     167#: free/templates/dashboard.php:218
     168msgid "Backup in Progress"
     169msgstr ""
     170
     171#: free/src/Admin/Admin.php:48
     172#: free/templates/dashboard.php:34
     173#: free/templates/settings.php:64
    23174msgid "Backupino"
    24175msgstr ""
    25176
    26 #. Plugin URI of the plugin
    27 #: backupino.php
    28 msgid "https://github.com/Backupino/documents"
    29 msgstr ""
    30 
    31 #. Description of the plugin
    32 #: backupino.php
    33 msgid "Fast, resumable WordPress backups, cloning and migration with a self-contained installer."
    34 msgstr ""
    35 
    36 #. Author URI of the plugin
    37 #: backupino.php
    38 msgid "https://profiles.wordpress.org/backupino/"
    39 msgstr ""
    40 
    41 #: src/Admin/Admin.php:47
     177#: free/backupino.php:1
     178msgid "Backupino - Free WordPress Backup & Migration"
     179msgstr ""
     180
     181#: free/src/Admin/Admin.php:47
    42182msgid "Backupino - WordPress Backup & Migration"
    43183msgstr ""
    44184
    45 #: src/Admin/Admin.php:58
    46 #: src/Admin/Admin.php:59
    47 #: templates/dashboard.php:43
    48 #: templates/settings.php:73
     185#: free/templates/dashboard.php:40
     186#: free/templates/settings.php:70
     187msgid "Backupino Navigation"
     188msgstr ""
     189
     190#: free/backupino.php:1
     191msgid "Backupino Verified Package"
     192msgstr ""
     193
     194#: free/templates/settings.php:379
     195msgid "Backupino automatically creates .htaccess (for Apache/LiteSpeed) and web.config (for Microsoft IIS) files inside the storage directory to block direct HTTP requests. An index.html file is also placed to hide directory browsing, but it cannot prevent direct downloads if an attacker knows or guesses the file name."
     196msgstr ""
     197
     198#: free/backupino.php:1
     199msgid "Backupino can announce every finished backup, with the permanent download link, in Telegram or Bale. The bot belongs to you: create one with @BotFather, then paste its token and your chat id here."
     200msgstr ""
     201
     202#: free/templates/settings.php:437
     203msgid "Backupino can announce every finished backup, with the permanent download link, in Telegram or Bale. You can enable either or both messengers simultaneously."
     204msgstr ""
     205
     206#: free/templates/dashboard.php:63
     207msgid "Backupino cannot automatically alter or reload Nginx configuration. Direct HTTP access is not blocked until your server administrator applies the server rule."
     208msgstr ""
     209
     210#: free/src/Plugin.php:190
     211msgid "Backupino cannot run on this server:"
     212msgstr ""
     213
     214#: free/backupino.php:1
     215msgid "Backupino is up to date. You are running the latest version (%s)."
     216msgstr ""
     217
     218#: free/templates/settings.php:359
     219msgid "Backupino places .htaccess (Apache/LiteSpeed), web.config (IIS), and index.html (hides directory listing only) in this directory. Nginx ignores .htaccess and web.config; direct HTTP access is NOT guaranteed to be blocked on Nginx until you add a server-level deny rule."
     220msgstr ""
     221
     222#: free/src/Core/Compatibility.php:49
     223msgid "Backupino requires PHP %1$s or newer. This server runs PHP %2$s."
     224msgstr ""
     225
     226#: free/backupino.php:1
     227msgid "Backupino settings"
     228msgstr ""
     229
     230#: free/src/Admin/Admin.php:185
     231msgid "Backupino — Site Migration Completed!"
     232msgstr ""
     233
     234#: free/backupino.php:1
     235msgid "Backupino — backup finished: %s"
     236msgstr ""
     237
     238#: free/backupino.php:1
     239msgid "Backupino — test message from %s"
     240msgstr ""
     241
     242#: free/src/Core/Activator.php:45
     243#: free/src/Cron/Scheduler.php:62
     244msgid "Backupino: every minute"
     245msgstr ""
     246
     247#: free/src/Admin/Admin.php:58
     248#: free/src/Admin/Admin.php:59
     249#: free/templates/dashboard.php:43
     250#: free/templates/settings.php:73
    49251msgid "Backups"
    50252msgstr ""
    51253
    52 #: src/Admin/Admin.php:67
    53 #: src/Admin/Admin.php:68
    54 #: src/Admin/Admin.php:160
    55 #: templates/dashboard.php:47
    56 #: templates/settings.php:77
     254#: free/src/Notify/ChannelFactory.php:37
     255msgid "Bale"
     256msgstr ""
     257
     258#: free/templates/settings.php:496
     259msgid "Bale Bot Token"
     260msgstr ""
     261
     262#: free/templates/settings.php:505
     263msgid "Bale Chat ID"
     264msgstr ""
     265
     266#: free/templates/settings.php:486
     267msgid "Bale Notification"
     268msgstr ""
     269
     270#: free/templates/settings.php:506
     271msgid "Bale numeric chat or channel ID."
     272msgstr ""
     273
     274#: free/templates/settings.php:319
     275msgid "Batch size for slicing file packing per tick. Default 1000 files ensures fast backup on modern systems."
     276msgstr ""
     277
     278#: free/backupino.php:1
     279msgid "Batch size for slicing file packing per tick. Default 250 files is balanced for shared hosting."
     280msgstr ""
     281
     282#: free/templates/dashboard.php:195
     283msgid "Before updating plugins"
     284msgstr ""
     285
     286#: free/templates/settings.php:28
     287#: free/templates/settings.php:434
     288msgid "Bot Notifications"
     289msgstr ""
     290
     291#: free/backupino.php:1
     292msgid "Bot token"
     293msgstr ""
     294
     295#: free/templates/settings.php:497
     296msgid "Bot token obtained from Bale @BotFather."
     297msgstr ""
     298
     299#: free/templates/settings.php:456
     300msgid "Bot token obtained from Telegram @BotFather."
     301msgstr ""
     302
     303#: free/templates/dashboard.php:224
     304msgid "Cancel"
     305msgstr ""
     306
     307#: free/templates/dashboard.php:222
     308msgid "Cancel backup job"
     309msgstr ""
     310
     311#: free/src/Admin/Admin.php:117
     312msgid "Cancel the current backup job?"
     313msgstr ""
     314
     315#: free/src/Jobs/JobStatus.php:62
     316msgid "Cancelled"
     317msgstr ""
     318
     319#: free/src/Jobs/JobRunner.php:308
     320msgid "Cancelled by the user."
     321msgstr ""
     322
     323#: free/templates/dashboard.php:233
     324msgid "Cataloging"
     325msgstr ""
     326
     327#: free/backupino.php:1
     328msgid "Chat id"
     329msgstr ""
     330
     331#: free/backupino.php:1
     332msgid "Check GitHub releases for the latest version and updates."
     333msgstr ""
     334
     335#: free/backupino.php:1
     336msgid "Check for updates"
     337msgstr ""
     338
     339#: free/backupino.php:1
     340msgid "Checking for updates…"
     341msgstr ""
     342
     343#: free/templates/dashboard.php:335
     344msgid "Click to view log and details"
     345msgstr ""
     346
     347#: free/templates/dashboard.php:411
     348#: free/templates/dashboard.php:459
     349msgid "Close"
     350msgstr ""
     351
     352#: free/templates/settings.php:156
     353msgid "Compatible"
     354msgstr ""
     355
     356#: free/src/Jobs/JobStatus.php:58
     357msgid "Completed"
     358msgstr ""
     359
     360#: free/templates/settings.php:649
     361msgid "Configure preset credentials for the standalone migration installer generated with each backup."
     362msgstr ""
     363
     364#: free/templates/settings.php:292
     365msgid "Configure which files, folders, or sizes should be skipped during backup creation to save disk space and maximize speed."
     366msgstr ""
     367
     368#: free/backupino.php:1
     369msgid "Contents: %s"
     370msgstr ""
     371
     372#: free/templates/dashboard.php:99
     373msgid "Copy link"
     374msgstr ""
     375
     376#: free/src/Backup/Stages/DatabaseStage.php:40
     377msgid "Copying the database"
     378msgstr ""
     379
     380#: free/src/Backup/ZipArchiveWriter.php:109
     381msgid "Could not add file to archive: %s"
     382msgstr ""
     383
     384#: free/backupino.php:1
     385msgid "Could not check for updates. Please try again later."
     386msgstr ""
     387
     388#: free/src/Admin/RestController.php:237
     389msgid "Could not create backup job in database."
     390msgstr ""
     391
     392#: free/src/Backup/ZipArchiveWriter.php:73
     393msgid "Could not open the archive (error %d)."
     394msgstr ""
     395
     396#: free/src/Storage/LocalStorage.php:97
     397msgid "Could not read the package file."
     398msgstr ""
     399
     400#: free/src/Storage/LocalStorage.php:104
     401msgid "Could not write the package file."
     402msgstr ""
     403
     404#: free/templates/dashboard.php:165
     405msgid "Create a backup"
     406msgstr ""
     407
     408#: free/backupino.php:1
     409msgid "Create a new WordPress Administrator account (Optional)"
     410msgstr ""
     411
     412#: free/templates/dashboard.php:201
     413msgid "Create backup"
     414msgstr ""
     415
     416#: free/templates/dashboard.php:300
     417msgid "Created"
     418msgstr ""
     419
     420#: free/src/Download/PublicDownload.php:289
     421msgid "Created Date"
     422msgstr ""
     423
     424#: free/templates/settings.php:691
     425msgid "Current Version:"
     426msgstr ""
     427
     428#: free/templates/dashboard.php:237
     429msgid "Database"
     430msgstr ""
     431
     432#: free/templates/settings.php:189
     433msgid "Database Driver"
     434msgstr ""
     435
     436#: free/src/Backup/Stages/DatabaseStage.php:61
     437msgid "Database dump disabled."
     438msgstr ""
     439
     440#: free/templates/dashboard.php:424
     441msgid "Date"
     442msgstr ""
     443
     444#: free/backupino.php:1
     445msgid "Date: %s"
     446msgstr ""
     447
     448#: free/templates/settings.php:663
     449msgid "Default new URL (optional)"
     450msgstr ""
     451
     452#: free/templates/dashboard.php:390
     453msgid "Delete"
     454msgstr ""
     455
     456#: free/backupino.php:1
     457msgid "Delete backup"
     458msgstr ""
     459
     460#: free/templates/dashboard.php:389
     461msgid "Delete backup package"
     462msgstr ""
     463
     464#: free/src/Admin/Admin.php:112
     465msgid "Delete this package permanently?"
     466msgstr ""
     467
     468#: free/backupino.php:1
     469msgid "Description of the plugin"
     470msgstr ""
     471
     472#: free/templates/dashboard.php:115
     473msgid "Destination"
     474msgstr ""
     475
     476#: free/backupino.php:1
     477msgid "Diagnostic information about active server extensions and write permissions."
     478msgstr ""
     479
     480#: free/templates/settings.php:390
     481msgid "Direct HTTP access to backup package URLs is NOT guaranteed to be blocked on Nginx until your server administrator adds the deny rule below inside your Nginx server { } block and reloads Nginx. Merely viewing this rule in the admin panel does not activate it."
     482msgstr ""
     483
     484#: free/templates/dashboard.php:89
     485msgid "Direct link that always serves the newest completed backup. Requires administrator login before download."
     486msgstr ""
     487
     488#: free/backupino.php:1
     489msgid "Disabled"
     490msgstr ""
     491
     492#: free/backupino.php:1
     493msgid "Download"
     494msgstr ""
     495
     496#: free/backupino.php:1
     497msgid "Download (sign in as an administrator):"
     498msgstr ""
     499
     500#: free/templates/dashboard.php:367
     501msgid "Download Archive"
     502msgstr ""
     503
     504#: free/templates/dashboard.php:366
     505#: free/templates/dashboard.php:440
     506msgid "Download Archive (.zip)"
     507msgstr ""
     508
     509#: free/src/Download/PublicDownload.php:297
     510msgid "Download Archive + Installer (Both)"
     511msgstr ""
     512
     513#: free/templates/dashboard.php:382
     514msgid "Download Archive and Installer simultaneously"
     515msgstr ""
     516
     517#: free/src/Download/PublicDownload.php:301
     518msgid "Download Backup Archive (.zip)"
     519msgstr ""
     520
     521#: free/src/Download/PublicDownload.php:267
     522#: free/src/Download/PublicDownload.php:276
     523msgid "Download Backup Package"
     524msgstr ""
     525
     526#: free/templates/dashboard.php:383
     527msgid "Download Both"
     528msgstr ""
     529
     530#: free/templates/dashboard.php:374
     531msgid "Download Installer"
     532msgstr ""
     533
     534#: free/templates/dashboard.php:443
     535msgid "Download Installer (.php)"
     536msgstr ""
     537
     538#: free/src/Download/PublicDownload.php:305
     539#: free/templates/dashboard.php:373
     540msgid "Download Installer (installer.php)"
     541msgstr ""
     542
     543#: free/templates/settings.php:546
     544msgid "Download Link"
     545msgstr ""
     546
     547#: free/backupino.php:1
     548msgid "Download ZIP"
     549msgstr ""
     550
     551#: free/templates/dashboard.php:186
     552msgid "Dumps all WordPress database tables into pure standard SQL without relying on mysqldump."
     553msgstr ""
     554
     555#: free/templates/dashboard.php:153
     556msgid "Each backup includes installer.php alongside the archive zip. You can copy both files to an empty domain or localhost and run installer.php in your browser to restore the entire website in 3 steps without pre-installing WordPress."
     557msgstr ""
     558
     559#: free/templates/settings.php:490
     560msgid "Enable Bale"
     561msgstr ""
     562
     563#: free/templates/settings.php:449
     564msgid "Enable Telegram"
     565msgstr ""
     566
     567#: free/templates/settings.php:181
     568msgid "Enabled"
     569msgstr ""
     570
     571#: free/templates/settings.php:615
     572msgid "Enables recurring background backup jobs using WordPress built-in WP-Cron scheduler."
     573msgstr ""
     574
     575#: free/templates/settings.php:201
     576msgid "Encrypted"
     577msgstr ""
     578
     579#: free/templates/settings.php:111
     580msgid "Environment"
     581msgstr ""
     582
     583#: free/templates/dashboard.php:169
     584msgid "Everything is packed into one archive plus a standalone installer that rebuilds the site on any empty server."
     585msgstr ""
     586
     587#: free/templates/settings.php:302
     588msgid "Examples: wp-content/uploads/2022/, *.mp4, node_modules/. Cache and backup folders are always skipped automatically."
     589msgstr ""
     590
     591#: free/backupino.php:1
     592msgid "Examples: wp-content/uploads/2022/, *.mp4, node_modules/. Cache and backup folders are always skipped."
     593msgstr ""
     594
     595#: free/templates/settings.php:297
     596msgid "Excluded paths and patterns (one per line)"
     597msgstr ""
     598
     599#: free/src/Storage/LocalStorage.php:75
     600msgid "Executable files cannot be stored in backup storage."
     601msgstr ""
     602
     603#: free/templates/dashboard.php:450
     604msgid "Execution Log"
     605msgstr ""
     606
     607#: free/templates/settings.php:171
     608msgid "Execution Timeout"
     609msgstr ""
     610
     611#: free/src/Jobs/JobStatus.php:60
     612msgid "Failed"
     613msgstr ""
     614
     615#: free/src/Download/PublicDownload.php:285
     616msgid "File Size"
     617msgstr ""
     618
     619#: free/src/Backup/Stages/FilesStage.php:77
     620msgid "File archiving disabled."
     621msgstr ""
     622
     623#: free/src/Backup/ZipArchiveWriter.php:99
     624msgid "File is not readable: %s"
     625msgstr ""
     626
     627#: free/templates/dashboard.php:241
     628msgid "Files"
     629msgstr ""
     630
     631#: free/templates/settings.php:310
     632msgid "Files exceeding this size threshold will be skipped to keep backups fast and reliable. Enter 0 for no limit."
     633msgstr ""
     634
     635#: free/templates/settings.php:318
     636msgid "Files packed per request"
     637msgstr ""
     638
     639#: free/src/Backup/Stages/FinalizeStage.php:43
     640msgid "Finalizing the package"
     641msgstr ""
     642
     643#: free/templates/settings.php:298
     644msgid "Folders or file patterns that will be excluded from the backup archive (e.g. wp-content/cache/, *.mp4)."
     645msgstr ""
     646
     647#: free/backupino.php:1
     648msgid "Free"
     649msgstr ""
     650
     651#: free/src/Installer/Env.php:90
     652msgid "Free disk space"
     653msgstr ""
     654
     655#: free/templates/settings.php:621
     656msgid "Frequency"
     657msgstr ""
     658
     659#: free/templates/settings.php:549
     660#: free/templates/settings.php:580
     661msgid "HTML formatting tags such as <b>bold</b> and <a href=\"...\">links</a> are supported."
     662msgstr ""
     663
     664#: free/backupino.php:1
     665msgid "Hide"
     666msgstr ""
     667
     668#: free/src/Download/PublicDownload.php:310
     669msgid "How to restore or migrate:"
     670msgstr ""
     671
     672#: free/backupino.php:1
     673msgid "In Free edition, monthly execution triggers on the 1st of each Persian/Gregorian month based on site language."
     674msgstr ""
     675
     676#: free/templates/settings.php:199
     677msgid "Inactive"
     678msgstr ""
     679
     680#: free/templates/dashboard.php:185
     681msgid "Include database"
     682msgstr ""
     683
     684#: free/templates/dashboard.php:180
     685msgid "Include files"
     686msgstr ""
     687
     688#: free/templates/dashboard.php:181
     689msgid "Includes WordPress core files, active themes, plugins, and uploads media library."
     690msgstr ""
     691
     692#: free/templates/dashboard.php:262
     693msgid "Initializing backup job…"
     694msgstr ""
     695
     696#: free/templates/dashboard.php:245
     697msgid "Installer"
     698msgstr ""
     699
     700#: free/src/Download/PublicDownload.php:140
     701msgid "Installer file not found."
     702msgstr ""
     703
     704#: free/templates/settings.php:655
     705msgid "Installer password (optional)"
     706msgstr ""
     707
     708#: free/src/Admin/DownloadHandler.php:56
     709msgid "Invalid file name."
     710msgstr ""
     711
     712#: free/backupino.php:1
     713msgid "Isolated, protected path used to safely store archive files away from public access:"
     714msgstr ""
     715
     716#: free/templates/dashboard.php:173
     717msgid "JavaScript is required to build backups."
     718msgstr ""
     719
     720#: free/templates/settings.php:633
     721msgid "Keep at most (backups)"
     722msgstr ""
     723
     724#: free/templates/dashboard.php:192
     725msgid "Label (optional)"
     726msgstr ""
     727
     728#: free/src/Admin/Admin.php:114
     729msgid "Link copied to the clipboard."
     730msgstr ""
     731
     732#: free/templates/dashboard.php:274
     733msgid "Live Activity Feed"
     734msgstr ""
     735
     736#: free/templates/settings.php:145
     737msgid "Live diagnostic health report of active server extensions, filesystem permissions, and system stability."
     738msgstr ""
     739
     740#: free/templates/dashboard.php:453
     741msgid "Loading logs…"
     742msgstr ""
     743
     744#: free/backupino.php:1
     745msgid "Loading…"
     746msgstr ""
     747
     748#: free/templates/settings.php:212
     749msgid "Local directory used to store backup archives. Guarded with .htaccess (Apache/LiteSpeed), web.config (IIS), and index.html (directory listing). On Nginx, direct HTTP access is NOT guaranteed to be blocked until a server-level deny rule is configured."
     750msgstr ""
     751
     752#: free/backupino.php:1
     753msgid "Local folder: %s"
     754msgstr ""
     755
     756#: free/templates/settings.php:403
     757msgid "Manual Nginx Rule Configuration Required"
     758msgstr ""
     759
     760#: free/templates/settings.php:634
     761msgid "Maximum number of recent backups to keep on disk. Older packages are automatically pruned to save space."
     762msgstr ""
     763
     764#: free/templates/dashboard.php:123
     765#: free/templates/settings.php:120
     766#: free/templates/settings.php:162
     767msgid "Memory Limit"
     768msgstr ""
     769
     770#: free/templates/dashboard.php:428
     771msgid "Message"
     772msgstr ""
     773
     774#: free/templates/settings.php:529
     775msgid "Message template sent to messengers when a backup finishes."
     776msgstr ""
     777
     778#: free/templates/settings.php:561
     779msgid "Message template sent to messengers when the site is restored using the installer."
     780msgstr ""
     781
     782#: free/backupino.php:1
     783msgid "Messenger"
     784msgstr ""
     785
     786#: free/backupino.php:1
     787msgid "Messenger Platform"
     788msgstr ""
     789
     790#: free/templates/settings.php:626
     791msgid "Monthly (first day of the month)"
     792msgstr ""
     793
     794#: free/templates/settings.php:622
     795msgid "Monthly execution triggers on the 1st of each Persian/Gregorian month based on site language."
     796msgstr ""
     797
     798#: free/src/Installer/Env.php:56
     799msgid "MySQL driver"
     800msgstr ""
     801
     802#: free/src/Core/Compatibility.php:66
     803msgid "Neither the Zip extension nor PclZip is available, so archives cannot be created."
     804msgstr ""
     805
     806#: free/backupino.php:1
     807msgid "New Administrator Account Created:"
     808msgstr ""
     809
     810#: free/templates/settings.php:575
     811msgid "New Site URL"
     812msgstr ""
     813
     814#: free/templates/settings.php:382
     815msgid "Nginx & Reverse Proxy Limitations:"
     816msgstr ""
     817
     818#: free/templates/dashboard.php:62
     819msgid "Nginx Server Configuration Note:"
     820msgstr ""
     821
     822#: free/templates/settings.php:366
     823msgid "Nginx Server Detected — Action Required to Block Direct Access:"
     824msgstr ""
     825
     826#: free/templates/settings.php:383
     827msgid "Nginx completely ignores .htaccess and web.config files. Because reverse proxies or front-end caches may sit in front of Apache or PHP-FPM, automated web server detection is best-effort and cannot be guaranteed in every architecture. Backupino cannot automatically modify or reload Nginx configuration files."
     828msgstr ""
     829
     830#: free/templates/settings.php:225
     831msgid "Nginx detected — manual server configuration required:"
     832msgstr ""
     833
     834#: free/templates/settings.php:367
     835msgid "Nginx does not enforce .htaccess or web.config rules, and index.html only conceals directory listings. Action is required by your server administrator to prevent direct HTTP downloads of backup files."
     836msgstr ""
     837
     838#: free/templates/settings.php:226
     839msgid "Nginx ignores .htaccess and web.config. Backupino cannot automatically alter or reload Nginx configuration. Direct HTTP downloads of package URLs are not guaranteed to be blocked until your server administrator adds the rule below inside your Nginx server { } block and reloads Nginx."
     840msgstr ""
     841
     842#: free/src/Core/Compatibility.php:108
     843msgid "Nginx web server detected: Nginx ignores .htaccess and web.config files, and index.html only hides directory listing. Direct HTTP access to backup files is NOT guaranteed to be blocked until your server administrator adds the server-level Nginx deny rule in Backupino -> Settings -> Storage Destination and reloads Nginx. Backupino cannot automatically alter or reload Nginx configuration."
     844msgstr ""
     845
     846#: free/templates/dashboard.php:312
     847msgid "No backups yet."
     848msgstr ""
     849
     850#: free/src/Notify/Notifier.php:251
     851msgid "No messenger is configured."
     852msgstr ""
     853
     854#: free/templates/settings.php:266
     855msgid "No recent log entries found."
     856msgstr ""
     857
     858#: free/src/Installer/Env.php:92
     859msgid "Not restricted / host managed"
     860msgstr ""
     861
     862#: free/backupino.php:1
     863msgid "Notifications"
     864msgstr ""
     865
     866#: free/backupino.php:1
     867msgid "Notifications are working. Backups will be announced here."
     868msgstr ""
     869
     870#: free/backupino.php:1
     871msgid "Numeric chat or channel ID where notifications should be posted."
     872msgstr ""
     873
     874#: free/templates/settings.php:165
     875#: free/templates/settings.php:174
     876msgid "OK"
     877msgstr ""
     878
     879#: free/src/Cron/Scheduler.php:69
     880msgid "Once monthly (first day of the month)"
     881msgstr ""
     882
     883#: free/backupino.php:1
     884msgid "Once weekly"
     885msgstr ""
     886
     887#: free/src/Download/PublicDownload.php:313
     888msgid "Open installer.php in your web browser and follow the on-screen steps."
     889msgstr ""
     890
     891#: free/templates/settings.php:198
     892msgid "OpenSSL"
     893msgstr ""
     894
     895#: free/src/Core/Compatibility.php:100
     896msgid "OpenSSL extension is missing: secure HTTPS communications will be unavailable."
     897msgstr ""
     898
     899#: free/backupino.php:1
     900msgid "OpenSSL is missing: S3 uploads that require HTTPS signatures and encrypted packages will be unavailable."
     901msgstr ""
     902
     903#: free/templates/dashboard.php:193
     904msgid "Optional note to identify why this backup was created (e.g. before updating WooCommerce)."
     905msgstr ""
     906
     907#: free/templates/dashboard.php:119
     908#: free/templates/settings.php:116
     909#: free/templates/settings.php:153
     910msgid "PHP Version"
     911msgstr ""
     912
     913#: free/src/Installer/Env.php:40
     914msgid "PHP extension: %s"
     915msgstr ""
     916
     917#: free/src/Core/Compatibility.php:84
     918msgid "PHP memory limit is %s. Backups will run in small chunks, but 128M or more is recommended."
     919msgstr ""
     920
     921#: free/src/Installer/Env.php:33
     922msgid "PHP version"
     923msgstr ""
     924
     925#: free/templates/dashboard.php:435
     926msgid "Package"
     927msgstr ""
     928
     929#: free/src/Backup/Stages/FinalizeStage.php:130
     930msgid "Package %1$s is ready (%2$s)."
     931msgstr ""
     932
     933#: free/src/Download/PublicDownload.php:281
     934msgid "Package Name"
     935msgstr ""
     936
     937#: free/templates/dashboard.php:303
     938msgid "Package name"
     939msgstr ""
     940
     941#: free/src/Storage/LocalStorage.php:119
     942msgid "Package not found."
     943msgstr ""
     944
     945#: free/backupino.php:1
     946msgid "Packages are stored on: %s"
     947msgstr ""
     948
     949#: free/templates/dashboard.php:249
     950msgid "Packaging"
     951msgstr ""
     952
     953#: free/src/Backup/Stages/FilesStage.php:155
     954msgid "Packed %1$s of %2$s files (%3$s skipped, %4$s)."
     955msgstr ""
     956
     957#: free/templates/settings.php:656
     958msgid "Password protecting installer.php when accessed via browser during migration or restoration."
     959msgstr ""
     960
     961#: free/templates/settings.php:181
     962msgid "PclZip fallback"
     963msgstr ""
     964
     965#: free/templates/dashboard.php:88
     966msgid "Permanent download link"
     967msgstr ""
     968
     969#: free/backupino.php:1
     970msgid "Plugin Name of the plugin"
     971msgstr ""
     972
     973#: free/templates/settings.php:692
     974msgid "Plugin updates are delivered securely through the official WordPress repository."
     975msgstr ""
     976
     977#: free/templates/settings.php:664
     978msgid "Preset target URL for search & replace when migrating to a known new domain."
     979msgstr ""
     980
     981#: free/templates/settings.php:340
     982msgid "Primary Destination Driver"
     983msgstr ""
     984
     985#: free/templates/settings.php:341
     986msgid "Primary storage destination for completed packages."
     987msgstr ""
     988
     989#: free/backupino.php:1
     990msgid "Primary storage destination for completed packages. In the Free edition, local protected storage is used."
     991msgstr ""
     992
     993#: free/templates/dashboard.php:302
     994#: free/templates/dashboard.php:420
     995msgid "Progress"
     996msgstr ""
     997
     998#: free/templates/settings.php:126
     999msgid "Protected"
     1000msgstr ""
     1001
     1002#: free/backupino.php:1
     1003msgid "Protected Directory Path"
     1004msgstr ""
     1005
     1006#: free/src/Jobs/JobStatus.php:54
     1007msgid "Queued"
     1008msgstr ""
     1009
     1010#: free/backupino.php:1
     1011msgid "Quick Navigation"
     1012msgstr ""
     1013
     1014#: free/templates/dashboard.php:275
     1015msgid "RUNNING"
     1016msgstr ""
     1017
     1018#: free/templates/settings.php:183
     1019msgid "Ready"
     1020msgstr ""
     1021
     1022#: free/templates/dashboard.php:278
     1023msgid "Ready to start backup..."
     1024msgstr ""
     1025
     1026#: free/templates/settings.php:680
     1027msgid "Receive critical security notices, product updates, and roadmap announcements (opt-in)."
     1028msgstr ""
     1029
     1030#: free/templates/dashboard.php:294
     1031msgid "Recent backups"
     1032msgstr ""
     1033
     1034#: free/templates/settings.php:32
     1035#: free/templates/settings.php:606
     1036msgid "Recurring Schedule"
     1037msgstr ""
     1038
     1039#: free/templates/settings.php:248
     1040msgid "Refresh"
     1041msgstr ""
     1042
     1043#: free/templates/dashboard.php:67
     1044msgid "Required Nginx server configuration (add inside your server { } block and reload Nginx):"
     1045msgstr ""
     1046
     1047#: free/templates/settings.php:577
     1048msgid "Restoration Date"
     1049msgstr ""
     1050
     1051#: free/templates/settings.php:558
     1052msgid "Restoration Message Template"
     1053msgstr ""
     1054
     1055#: free/templates/settings.php:218
     1056msgid "Run Storage Write Test"
     1057msgstr ""
     1058
     1059#: free/templates/settings.php:614
     1060msgid "Run automatic backups"
     1061msgstr ""
     1062
     1063#: free/src/Jobs/JobStatus.php:56
     1064msgid "Running"
     1065msgstr ""
     1066
     1067#: free/templates/settings.php:703
     1068msgid "Save settings"
     1069msgstr ""
     1070
     1071#: free/src/Backup/Stages/ScanStage.php:39
     1072msgid "Scanning files"
     1073msgstr ""
     1074
     1075#: free/backupino.php:1
     1076msgid "Schedule"
     1077msgstr ""
     1078
     1079#: free/src/Cron/Scheduler.php:115
     1080msgid "Scheduled backup"
     1081msgstr ""
     1082
     1083#: free/src/Backup/Stages/FinalizeStage.php:78
     1084msgid "Sealing the archive…"
     1085msgstr ""
     1086
     1087#: free/backupino.php:1
     1088msgid "Select which messaging platform to send backup completion or failure alerts to."
     1089msgstr ""
     1090
     1091#: free/backupino.php:1
     1092msgid "Send test message"
     1093msgstr ""
     1094
     1095#: free/templates/settings.php:387
     1096msgid "Server Administrator Nginx Configuration"
     1097msgstr ""
     1098
     1099#: free/src/Admin/Admin.php:67
     1100#: free/src/Admin/Admin.php:68
     1101#: free/src/Admin/Admin.php:160
     1102#: free/templates/dashboard.php:47
     1103#: free/templates/settings.php:77
    571104msgid "Settings"
    581105msgstr ""
    591106
    60 #: src/Admin/Admin.php:109
     1107#: free/templates/settings.php:90
     1108msgid "Settings Navigation"
     1109msgstr ""
     1110
     1111#: free/src/Admin/Admin.php:113
     1112msgid "Settings saved."
     1113msgstr ""
     1114
     1115#: free/backupino.php:1
     1116msgid "Show"
     1117msgstr ""
     1118
     1119#: free/templates/settings.php:542
     1120#: free/templates/settings.php:574
     1121msgid "Site Name"
     1122msgstr ""
     1123
     1124#: free/templates/dashboard.php:304
     1125#: free/templates/dashboard.php:436
     1126msgid "Size"
     1127msgstr ""
     1128
     1129#: free/backupino.php:1
     1130msgid "Size: %s"
     1131msgstr ""
     1132
     1133#: free/templates/settings.php:309
     1134msgid "Skip files larger than (MB, 0 = no limit)"
     1135msgstr ""
     1136
     1137#: free/src/Installer/Extractor.php:136
     1138msgid "Skipped unsafe entry: %s"
     1139msgstr ""
     1140
     1141#: free/templates/settings.php:36
     1142#: free/templates/settings.php:646
     1143msgid "Standalone Installer"
     1144msgstr ""
     1145
     1146#: free/templates/dashboard.php:149
     1147msgid "Standalone Restore"
     1148msgstr ""
     1149
     1150#: free/src/Admin/Admin.php:109
    611151msgid "Starting…"
    621152msgstr ""
    631153
    64 #: src/Admin/Admin.php:110
     1154#: free/templates/dashboard.php:301
     1155#: free/templates/dashboard.php:416
     1156msgid "Status"
     1157msgstr ""
     1158
     1159#: free/backupino.php:1
     1160msgid "Storage"
     1161msgstr ""
     1162
     1163#: free/templates/dashboard.php:110
     1164msgid "Storage & Environment"
     1165msgstr ""
     1166
     1167#: free/templates/settings.php:24
     1168#: free/templates/settings.php:332
     1169msgid "Storage Destination"
     1170msgstr ""
     1171
     1172#: free/templates/settings.php:355
     1173msgid "Storage Directory Path"
     1174msgstr ""
     1175
     1176#: free/templates/settings.php:124
     1177msgid "Storage Status"
     1178msgstr ""
     1179
     1180#: free/templates/dashboard.php:133
     1181msgid "Storage folder:"
     1182msgstr ""
     1183
     1184#: free/src/Admin/RestController.php:455
     1185msgid "Storage is writable."
     1186msgstr ""
     1187
     1188#: free/templates/settings.php:192
     1189msgid "Streaming"
     1190msgstr ""
     1191
     1192#: free/templates/settings.php:244
     1193msgid "System & Activity Log Stream"
     1194msgstr ""
     1195
     1196#: free/templates/settings.php:258
     1197msgid "System Activity Log (Last 100 entries)"
     1198msgstr ""
     1199
     1200#: free/templates/settings.php:40
     1201msgid "System Status"
     1202msgstr ""
     1203
     1204#: free/templates/settings.php:141
     1205msgid "System Status & Diagnostics"
     1206msgstr ""
     1207
     1208#: free/backupino.php:1
     1209msgid "System status"
     1210msgstr ""
     1211
     1212#: free/templates/settings.php:417
     1213msgid "Target filesystem path: %s"
     1214msgstr ""
     1215
     1216#: free/src/Notify/ChannelFactory.php:36
     1217msgid "Telegram"
     1218msgstr ""
     1219
     1220#: free/templates/settings.php:455
     1221msgid "Telegram Bot Token"
     1222msgstr ""
     1223
     1224#: free/templates/settings.php:464
     1225msgid "Telegram Chat ID"
     1226msgstr ""
     1227
     1228#: free/templates/settings.php:445
     1229msgid "Telegram Notification"
     1230msgstr ""
     1231
     1232#: free/templates/settings.php:465
     1233msgid "Telegram numeric chat or channel ID."
     1234msgstr ""
     1235
     1236#: free/templates/settings.php:516
     1237msgid "Test Bale"
     1238msgstr ""
     1239
     1240#: free/templates/settings.php:475
     1241msgid "Test Telegram"
     1242msgstr ""
     1243
     1244#: free/src/Admin/Admin.php:115
     1245msgid "Test message sent."
     1246msgstr ""
     1247
     1248#: free/templates/dashboard.php:139
     1249msgid "Test storage"
     1250msgstr ""
     1251
     1252#: free/src/Core/Compatibility.php:59
     1253msgid "The PHP extension \"%s\" is required but not loaded."
     1254msgstr ""
     1255
     1256#: free/src/Backup/Stages/DatabaseStage.php:77
     1257msgid "The SQL dump file could not be opened."
     1258msgstr ""
     1259
     1260#: free/src/Installer/Extractor.php:74
     1261msgid "The Zip extension is not available on this server."
     1262msgstr ""
     1263
     1264#: free/src/Backup/ZipArchiveWriter.php:60
     1265msgid "The Zip extension is not available."
     1266msgstr ""
     1267
     1268#: free/src/Installer/Extractor.php:88
     1269msgid "The archive cannot be opened. Is it complete?"
     1270msgstr ""
     1271
     1272#: free/src/Backup/ZipArchiveWriter.php:182
     1273msgid "The archive could not be finalized (%s)."
     1274msgstr ""
     1275
     1276#: free/src/Backup/ZipArchiveWriter.php:182
     1277msgid "The archive could not be finalized."
     1278msgstr ""
     1279
     1280#: free/src/Backup/Stages/FinalizeStage.php:85
     1281msgid "The archive could not be hashed."
     1282msgstr ""
     1283
     1284#: free/src/Installer/Extractor.php:80
     1285msgid "The archive file is missing."
     1286msgstr ""
     1287
     1288#: free/src/Backup/ZipArchiveWriter.php:89
     1289#: free/src/Backup/ZipArchiveWriter.php:132
     1290msgid "The archive is not open."
     1291msgstr ""
     1292
     1293#: free/templates/dashboard.php:285
     1294msgid "The backup process is running in the background. Please keep this browser window open until the operation finishes completely."
     1295msgstr ""
     1296
     1297#: free/templates/settings.php:410
     1298msgid "The backup storage directory is located outside standard web root or uses a custom path mapping. Your server administrator must manually configure an Nginx rule denying direct access based on your web server configuration."
     1299msgstr ""
     1300
     1301#: free/src/Notify/BotApi.php:191
     1302msgid "The bot token or chat id is missing."
     1303msgstr ""
     1304
     1305#: free/src/Installer/ConnectionManager.php:74
     1306msgid "The database could not be created: %s"
     1307msgstr ""
     1308
     1309#: free/templates/settings.php:232
     1310msgid "The exact Nginx location block cannot be determined automatically (e.g. external CDN or custom mapping). Please visit Backupino -> Settings -> Storage Destination to view manual configuration guidance."
     1311msgstr ""
     1312
     1313#: free/backupino.php:1
     1314msgid "The installer file could not be generated."
     1315msgstr ""
     1316
     1317#: free/src/Admin/Admin.php:111
     1318msgid "The job failed."
     1319msgstr ""
     1320
     1321#: free/src/Notify/BotApi.php:251
     1322msgid "The messenger answered with HTTP %d."
     1323msgstr ""
     1324
     1325#: free/src/Notify/BotApi.php:259
     1326msgid "The messenger rejected the message."
     1327msgstr ""
     1328
     1329#: free/src/Backup/Stages/FinalizeStage.php:99
     1330msgid "The package metadata could not be generated."
     1331msgstr ""
     1332
     1333#: free/src/Support/Fs.php:281
     1334msgid "The requested file does not exist."
     1335msgstr ""
     1336
     1337#: free/templates/dashboard.php:72
     1338msgid "The storage path cannot be resolved to an automatic Nginx location (for example, due to an external CDN, custom domain, or path outside webroot). Please see Backupino -> Settings -> Storage Destination to manually determine the rule for your server."
     1339msgstr ""
     1340
     1341#: free/src/Download/PublicDownload.php:101
     1342msgid "There is no backup ready to download yet."
     1343msgstr ""
     1344
     1345#: free/src/Notify/BotApi.php:197
     1346msgid "There is nothing to send."
     1347msgstr ""
     1348
     1349#: free/src/Download/PublicDownload.php:93
     1350msgid "This download link is not valid."
     1351msgstr ""
     1352
     1353#: free/templates/dashboard.php:93
     1354msgid "This link always points at the newest backup. It never expires, but the visitor must be signed in as an administrator before the download starts."
     1355msgstr ""
     1356
     1357#: free/backupino.php:1
     1358msgid "This location contains an .htaccess file blocking direct HTTP requests and indexing for maximum security."
     1359msgstr ""
     1360
     1361#: free/src/Admin/DownloadHandler.php:77
     1362#: free/src/Admin/DownloadHandler.php:81
     1363msgid "This package no longer exists on the server."
     1364msgstr ""
     1365
     1366#: free/src/Storage/LocalStorage.php:55
     1367msgid "This server"
     1368msgstr ""
     1369
     1370#: free/templates/dashboard.php:127
     1371msgid "Time Limit"
     1372msgstr ""
     1373
     1374#: free/src/Download/PublicDownload.php:65
     1375msgid "Too Many Requests"
     1376msgstr ""
     1377
     1378#: free/src/Download/PublicDownload.php:64
     1379msgid "Too many failed download attempts. Please try again in 10 minutes."
     1380msgstr ""
     1381
     1382#: free/src/Jobs/JobRunner.php:172
     1383msgid "Unknown pipeline stage."
     1384msgstr ""
     1385
     1386#: free/backupino.php:1
     1387msgid "Update Now"
     1388msgstr ""
     1389
     1390#: free/backupino.php:1
     1391msgid "Updates & Community"
     1392msgstr ""
     1393
     1394#: free/templates/settings.php:44
     1395#: free/templates/settings.php:676
     1396msgid "Updates & Privacy"
     1397msgstr ""
     1398
     1399#: free/src/Download/PublicDownload.php:312
     1400msgid "Upload both the .zip archive and installer.php into an empty directory on your destination server."
     1401msgstr ""
     1402
     1403#: free/src/Backup/Stages/FinalizeStage.php:260
     1404msgid "Upload failed: %s"
     1405msgstr ""
     1406
     1407#: free/src/Download/PublicDownload.php:274
     1408msgid "Verified Backup Package"
     1409msgstr ""
     1410
     1411#: free/backupino.php:1
     1412msgid "View Release Notes"
     1413msgstr ""
     1414
     1415#: free/templates/settings.php:684
     1416msgid "We respect your privacy. No telemetry or personal data is collected or sent without your explicit consent."
     1417msgstr ""
     1418
     1419#: free/templates/settings.php:376
     1420msgid "Web Server Direct Access Protection & Nginx Guidance"
     1421msgstr ""
     1422
     1423#: free/src/Admin/Admin.php:110
    651424msgid "Working…"
    661425msgstr ""
    671426
    68 #: src/Admin/Admin.php:111
    69 msgid "The job failed."
    70 msgstr ""
    71 
    72 #: src/Admin/Admin.php:112
    73 msgid "Delete this package permanently?"
    74 msgstr ""
    75 
    76 #: src/Admin/Admin.php:113
    77 msgid "Settings saved."
    78 msgstr ""
    79 
    80 #: src/Admin/Admin.php:114
    81 msgid "Link copied to the clipboard."
    82 msgstr ""
    83 
    84 #: src/Admin/Admin.php:115
    85 msgid "Test message sent."
    86 msgstr ""
    87 
    88 #: src/Admin/Admin.php:116
    89 msgid "Backup Job"
    90 msgstr ""
    91 
    92 #: src/Admin/Admin.php:117
    93 msgid "Cancel the current backup job?"
    94 msgstr ""
    95 
    96 #: src/Admin/Admin.php:118
    97 msgid "Backup cancelled."
    98 msgstr ""
    99 
    100 #: src/Admin/Admin.php:131
    101 #: src/Admin/Admin.php:144
     1427#: free/templates/settings.php:126
     1428msgid "Writable"
     1429msgstr ""
     1430
     1431#: free/src/Installer/Env.php:62
     1432msgid "Writable directory"
     1433msgstr ""
     1434
     1435#: free/src/Admin/DownloadHandler.php:50
     1436msgid "You are not allowed to download backups."
     1437msgstr ""
     1438
     1439#: free/src/Admin/Admin.php:131
     1440#: free/src/Admin/Admin.php:144
    1021441msgid "You are not allowed to manage backups."
    1031442msgstr ""
    1041443
    105 #: src/Admin/Admin.php:185
    106 msgid "Backupino — Site Migration Completed!"
    107 msgstr ""
    108 
    109 #: src/Admin/Admin.php:187
     1444#: free/backupino.php:1
     1445msgid "You do not have permission to check for updates."
     1446msgstr ""
     1447
     1448#: free/templates/settings.php:408
     1449msgid "Your WordPress uploads directory uses an external CDN or separate domain. The exact public Nginx location cannot be determined automatically. Your server administrator must manually create an Nginx location block matching your origin server URL mapping."
     1450msgstr ""
     1451
     1452#: free/src/Admin/Admin.php:187
    1101453msgid "Your website has been successfully restored and migrated to this location. Installer files and temporary data have been cleaned up."
    1111454msgstr ""
    1121455
    113 #: src/Admin/DownloadHandler.php:50
    114 msgid "You are not allowed to download backups."
    115 msgstr ""
    116 
    117 #: src/Admin/DownloadHandler.php:56
    118 msgid "Invalid file name."
    119 msgstr ""
    120 
    121 #: src/Admin/DownloadHandler.php:77
    122 #: src/Admin/DownloadHandler.php:81
    123 msgid "This package no longer exists on the server."
    124 msgstr ""
    125 
    126 #: src/Admin/RestController.php:237
    127 msgid "Could not create backup job in database."
    128 msgstr ""
    129 
    130 #: src/Admin/RestController.php:455
    131 msgid "Storage is writable."
    132 msgstr ""
    133 
    134 #: src/Backup/Stages/DatabaseStage.php:40
    135 msgid "Copying the database"
    136 msgstr ""
    137 
    138 #: src/Backup/Stages/DatabaseStage.php:61
    139 msgid "Database dump disabled."
    140 msgstr ""
    141 
    142 #: src/Backup/Stages/DatabaseStage.php:77
    143 msgid "The SQL dump file could not be opened."
    144 msgstr ""
    145 
    146 #. translators: 1: number of rows, 2: number of tables, 3: dumped size.
    147 #: src/Backup/Stages/DatabaseStage.php:99
    148 #, php-format
    149 msgid "%1$s rows from %2$s tables (%3$s)."
    150 msgstr ""
    151 
    152 #: src/Backup/Stages/FilesStage.php:40
    153 msgid "Archiving files"
    154 msgstr ""
    155 
    156 #: src/Backup/Stages/FilesStage.php:77
    157 msgid "File archiving disabled."
    158 msgstr ""
    159 
    160 #. translators: 1: packed files, 2: total files, 3: skipped files, 4: archive size.
    161 #: src/Backup/Stages/FilesStage.php:155
    162 #, php-format
    163 msgid "Packed %1$s of %2$s files (%3$s skipped, %4$s)."
    164 msgstr ""
    165 
    166 #: src/Backup/Stages/FinalizeStage.php:43
    167 msgid "Finalizing the package"
    168 msgstr ""
    169 
    170 #: src/Backup/Stages/FinalizeStage.php:78
    171 msgid "Sealing the archive…"
    172 msgstr ""
    173 
    174 #: src/Backup/Stages/FinalizeStage.php:85
    175 msgid "The archive could not be hashed."
    176 msgstr ""
    177 
    178 #: src/Backup/Stages/FinalizeStage.php:99
    179 msgid "The package metadata could not be generated."
    180 msgstr ""
    181 
    182 #. translators: 1: package name, 2: package size.
    183 #: src/Backup/Stages/FinalizeStage.php:130
    184 #, php-format
    185 msgid "Package %1$s is ready (%2$s)."
    186 msgstr ""
    187 
    188 #. translators: %s: storage error.
    189 #: src/Backup/Stages/FinalizeStage.php:260
    190 #, php-format
    191 msgid "Upload failed: %s"
    192 msgstr ""
    193 
    194 #: src/Backup/Stages/ScanStage.php:39
    195 msgid "Scanning files"
    196 msgstr ""
    197 
    198 #. translators: 1: number of files, 2: total size.
    199 #: src/Backup/Stages/ScanStage.php:86
    200 #, php-format
    201 msgid "%1$s files found (%2$s)."
    202 msgstr ""
    203 
    204 #: src/Backup/ZipArchiveWriter.php:60
    205 msgid "The Zip extension is not available."
    206 msgstr ""
    207 
    208 #. translators: %d: ZipArchive error code.
    209 #: src/Backup/ZipArchiveWriter.php:73
    210 #, php-format
    211 msgid "Could not open the archive (error %d)."
    212 msgstr ""
    213 
    214 #: src/Backup/ZipArchiveWriter.php:89
    215 #: src/Backup/ZipArchiveWriter.php:132
    216 msgid "The archive is not open."
    217 msgstr ""
    218 
    219 #. translators: %s: file path.
    220 #: src/Backup/ZipArchiveWriter.php:99
    221 #, php-format
    222 msgid "File is not readable: %s"
    223 msgstr ""
    224 
    225 #. translators: %s: file path.
    226 #: src/Backup/ZipArchiveWriter.php:109
    227 #, php-format
    228 msgid "Could not add file to archive: %s"
    229 msgstr ""
    230 
    231 #. translators: %s: status description.
    232 #: src/Backup/ZipArchiveWriter.php:182
    233 #, php-format
    234 msgid "The archive could not be finalized (%s)."
    235 msgstr ""
    236 
    237 #. translators: %s: status description.
    238 #: src/Backup/ZipArchiveWriter.php:182
    239 msgid "The archive could not be finalized."
    240 msgstr ""
    241 
    242 #: src/Core/Activator.php:45
    243 #: src/Cron/Scheduler.php:62
    244 msgid "Backupino: every minute"
    245 msgstr ""
    246 
    247 #. translators: 1: required PHP version, 2: current PHP version.
    248 #: src/Core/Compatibility.php:49
    249 #, php-format
    250 msgid "Backupino requires PHP %1$s or newer. This server runs PHP %2$s."
    251 msgstr ""
    252 
    253 #. translators: %s: PHP extension name.
    254 #: src/Core/Compatibility.php:59
    255 #, php-format
    256 msgid "The PHP extension \"%s\" is required but not loaded."
    257 msgstr ""
    258 
    259 #: src/Core/Compatibility.php:66
    260 msgid "Neither the Zip extension nor PclZip is available, so archives cannot be created."
    261 msgstr ""
    262 
    263 #. translators: %s: current memory limit.
    264 #: src/Core/Compatibility.php:84
    265 #, php-format
    266 msgid "PHP memory limit is %s. Backups will run in small chunks, but 128M or more is recommended."
    267 msgstr ""
    268 
    269 #. translators: %d: seconds.
    270 #: src/Core/Compatibility.php:94
    271 #, php-format
     1456#: free/templates/settings.php:180
     1457msgid "ZipArchive"
     1458msgstr ""
     1459
     1460#: free/src/Installer/Env.php:52
     1461msgid "ZipArchive available"
     1462msgstr ""
     1463
     1464#: free/src/Installer/Env.php:52
     1465msgid "ZipArchive missing"
     1466msgstr ""
     1467
     1468#: free/src/Notify/Notifier.php:185
     1469msgid "database only"
     1470msgstr ""
     1471
     1472#: free/src/Notify/Notifier.php:183
     1473msgid "files and database"
     1474msgstr ""
     1475
     1476#: free/src/Notify/Notifier.php:187
     1477msgid "files only"
     1478msgstr ""
     1479
     1480#: free/src/Installer/Env.php:42
     1481msgid "loaded"
     1482msgstr ""
     1483
     1484#: free/src/Core/Compatibility.php:94
    2721485msgid "max_execution_time is %d seconds. Long steps will be split automatically."
    2731486msgstr ""
    2741487
    275 #: src/Core/Compatibility.php:100
    276 msgid "OpenSSL extension is missing: secure HTTPS communications will be unavailable."
    277 msgstr ""
    278 
    279 #: src/Core/Compatibility.php:104
     1488#: free/src/Core/Compatibility.php:104
    2801489msgid "mbstring is missing: multibyte site titles may be truncated on URL replacement."
    2811490msgstr ""
    2821491
    283 #: src/Cron/Scheduler.php:69
    284 msgid "Once monthly (first day of the month)"
    285 msgstr ""
    286 
    287 #: src/Cron/Scheduler.php:115
    288 msgid "Scheduled backup"
    289 msgstr ""
    290 
    291 #: src/Download/PublicDownload.php:64
    292 msgid "Too many failed download attempts. Please try again in 10 minutes."
    293 msgstr ""
    294 
    295 #: src/Download/PublicDownload.php:65
    296 msgid "Too Many Requests"
    297 msgstr ""
    298 
    299 #: src/Download/PublicDownload.php:93
    300 msgid "This download link is not valid."
    301 msgstr ""
    302 
    303 #: src/Download/PublicDownload.php:101
    304 msgid "There is no backup ready to download yet."
    305 msgstr ""
    306 
    307 #: src/Download/PublicDownload.php:140
    308 msgid "Installer file not found."
    309 msgstr ""
    310 
    311 #: src/Download/PublicDownload.php:267
    312 #: src/Download/PublicDownload.php:276
    313 msgid "Download Backup Package"
    314 msgstr ""
    315 
    316 #: src/Download/PublicDownload.php:274
    317 msgid "Verified Backup Package"
    318 msgstr ""
    319 
    320 #: src/Download/PublicDownload.php:281
    321 msgid "Package Name"
    322 msgstr ""
    323 
    324 #: src/Download/PublicDownload.php:285
    325 msgid "File Size"
    326 msgstr ""
    327 
    328 #: src/Download/PublicDownload.php:289
    329 msgid "Created Date"
    330 msgstr ""
    331 
    332 #: src/Download/PublicDownload.php:297
    333 msgid "Download Archive + Installer (Both)"
    334 msgstr ""
    335 
    336 #: src/Download/PublicDownload.php:301
    337 msgid "Download Backup Archive (.zip)"
    338 msgstr ""
    339 
    340 #: src/Download/PublicDownload.php:305
    341 #: templates/dashboard.php:356
    342 msgid "Download Installer (installer.php)"
    343 msgstr ""
    344 
    345 #: src/Download/PublicDownload.php:310
    346 msgid "How to restore or migrate:"
    347 msgstr ""
    348 
    349 #: src/Download/PublicDownload.php:312
    350 msgid "Upload both the .zip archive and installer.php into an empty directory on your destination server."
    351 msgstr ""
    352 
    353 #: src/Download/PublicDownload.php:313
    354 msgid "Open installer.php in your web browser and follow the on-screen steps."
    355 msgstr ""
    356 
    357 #. translators: %s: driver error.
    358 #: src/Installer/ConnectionManager.php:74
    359 #, php-format
    360 msgid "The database could not be created: %s"
    361 msgstr ""
    362 
    363 #: src/Installer/Env.php:33
    364 msgid "PHP version"
    365 msgstr ""
    366 
    367 #. translators: %s: extension name.
    368 #: src/Installer/Env.php:40
    369 #, php-format
    370 msgid "PHP extension: %s"
    371 msgstr ""
    372 
    373 #: src/Installer/Env.php:42
    374 msgid "loaded"
    375 msgstr ""
    376 
    377 #: src/Installer/Env.php:42
     1492#: free/src/Installer/Env.php:42
    3781493msgid "missing"
    3791494msgstr ""
    3801495
    381 #: src/Installer/Env.php:50
    382 msgid "Archive support"
    383 msgstr ""
    384 
    385 #: src/Installer/Env.php:52
    386 msgid "ZipArchive available"
    387 msgstr ""
    388 
    389 #: src/Installer/Env.php:52
    390 msgid "ZipArchive missing"
    391 msgstr ""
    392 
    393 #: src/Installer/Env.php:56
    394 msgid "MySQL driver"
    395 msgstr ""
    396 
    397 #: src/Installer/Env.php:58
     1496#: free/src/Installer/Env.php:92
     1497msgid "needed"
     1498msgstr ""
     1499
     1500#: free/backupino.php:1
     1501msgid "none"
     1502msgstr ""
     1503
     1504#: free/src/Installer/Env.php:72
     1505msgid "not found: %s"
     1506msgstr ""
     1507
     1508#: free/src/Installer/Env.php:58
    3981509msgid "pdo_mysql missing"
    3991510msgstr ""
    4001511
    401 #: src/Installer/Env.php:62
    402 msgid "Writable directory"
    403 msgstr ""
    404 
    405 #: src/Installer/Env.php:70
    406 msgid "Archive file"
    407 msgstr ""
    408 
    409 #. translators: %s: file name.
    410 #: src/Installer/Env.php:72
    411 #, php-format
    412 msgid "not found: %s"
    413 msgstr ""
    414 
    415 #: src/Installer/Env.php:77
    416 msgid "Archive checksum"
    417 msgstr ""
    418 
    419 #: src/Installer/Env.php:79
     1512#: free/backupino.php:1
     1513msgid "unknown"
     1514msgstr ""
     1515
     1516#: free/src/Installer/Env.php:79
    4201517msgid "verified against the package manifest"
    4211518msgstr ""
    4221519
    423 #: src/Installer/Env.php:90
    424 msgid "Free disk space"
    425 msgstr ""
    426 
    427 #: src/Installer/Env.php:92
    428 msgid "Not restricted / host managed"
    429 msgstr ""
    430 
    431 #: src/Installer/Env.php:92
    432 msgid "needed"
    433 msgstr ""
    434 
    435 #: src/Installer/Extractor.php:74
    436 msgid "The Zip extension is not available on this server."
    437 msgstr ""
    438 
    439 #: src/Installer/Extractor.php:80
    440 msgid "The archive file is missing."
    441 msgstr ""
    442 
    443 #: src/Installer/Extractor.php:88
    444 msgid "The archive cannot be opened. Is it complete?"
    445 msgstr ""
    446 
    447 #. translators: %s: archive entry name.
    448 #: src/Installer/Extractor.php:136
    449 #, php-format
    450 msgid "Skipped unsafe entry: %s"
    451 msgstr ""
    452 
    453 #: src/Jobs/JobRunner.php:172
    454 msgid "Unknown pipeline stage."
    455 msgstr ""
    456 
    457 #: src/Jobs/JobRunner.php:308
    458 msgid "Cancelled by the user."
    459 msgstr ""
    460 
    461 #: src/Jobs/JobStatus.php:54
    462 msgid "Queued"
    463 msgstr ""
    464 
    465 #: src/Jobs/JobStatus.php:56
    466 msgid "Running"
    467 msgstr ""
    468 
    469 #: src/Jobs/JobStatus.php:58
    470 msgid "Completed"
    471 msgstr ""
    472 
    473 #: src/Jobs/JobStatus.php:60
    474 msgid "Failed"
    475 msgstr ""
    476 
    477 #: src/Jobs/JobStatus.php:62
    478 msgid "Cancelled"
    479 msgstr ""
    480 
    481 #: src/Notify/BotApi.php:191
    482 msgid "The bot token or chat id is missing."
    483 msgstr ""
    484 
    485 #: src/Notify/BotApi.php:197
    486 msgid "There is nothing to send."
    487 msgstr ""
    488 
    489 #. translators: %d: HTTP status code.
    490 #: src/Notify/BotApi.php:251
    491 #, php-format
    492 msgid "The messenger answered with HTTP %d."
    493 msgstr ""
    494 
    495 #: src/Notify/BotApi.php:259
    496 msgid "The messenger rejected the message."
    497 msgstr ""
    498 
    499 #: src/Notify/ChannelFactory.php:36
    500 msgid "Telegram"
    501 msgstr ""
    502 
    503 #: src/Notify/ChannelFactory.php:37
    504 msgid "Bale"
    505 msgstr ""
    506 
    507 #: src/Notify/Notifier.php:183
    508 msgid "files and database"
    509 msgstr ""
    510 
    511 #: src/Notify/Notifier.php:185
    512 msgid "database only"
    513 msgstr ""
    514 
    515 #: src/Notify/Notifier.php:187
    516 msgid "files only"
    517 msgstr ""
    518 
    519 #. translators: %s: messenger service name.
    520 #: src/Notify/Notifier.php:241
    521 #, php-format
    522 msgid "%s messenger is not enabled or not fully configured."
    523 msgstr ""
    524 
    525 #: src/Notify/Notifier.php:251
    526 msgid "No messenger is configured."
    527 msgstr ""
    528 
    529 #: src/Plugin.php:190
    530 msgid "Backupino cannot run on this server:"
    531 msgstr ""
    532 
    533 #: src/Storage/LocalStorage.php:55
    534 msgid "This server"
    535 msgstr ""
    536 
    537 #: src/Storage/LocalStorage.php:75
    538 msgid "Executable files cannot be stored in backup storage."
    539 msgstr ""
    540 
    541 #: src/Storage/LocalStorage.php:97
    542 msgid "Could not read the package file."
    543 msgstr ""
    544 
    545 #: src/Storage/LocalStorage.php:104
    546 msgid "Could not write the package file."
    547 msgstr ""
    548 
    549 #: src/Storage/LocalStorage.php:119
    550 msgid "Package not found."
    551 msgstr ""
    552 
    553 #: src/Support/Fs.php:281
    554 msgid "The requested file does not exist."
    555 msgstr ""
    556 
    557 #: templates/dashboard.php:40
    558 #: templates/settings.php:70
    559 msgid "Backupino Navigation"
    560 msgstr ""
    561 
    562 #: templates/dashboard.php:71
    563 msgid "Permanent download link"
    564 msgstr ""
    565 
    566 #: templates/dashboard.php:72
    567 msgid "Direct link that always serves the newest completed backup. Requires administrator login before download."
    568 msgstr ""
    569 
    570 #: templates/dashboard.php:76
    571 msgid "This link always points at the newest backup. It never expires, but the visitor must be signed in as an administrator before the download starts."
    572 msgstr ""
    573 
    574 #: templates/dashboard.php:82
    575 msgid "Copy link"
    576 msgstr ""
    577 
    578 #: templates/dashboard.php:93
    579 msgid "Storage & Environment"
    580 msgstr ""
    581 
    582 #: templates/dashboard.php:98
    583 msgid "Destination"
    584 msgstr ""
    585 
    586 #: templates/dashboard.php:102
    587 #: templates/settings.php:116
    588 #: templates/settings.php:153
    589 msgid "PHP Version"
    590 msgstr ""
    591 
    592 #: templates/dashboard.php:106
    593 #: templates/settings.php:120
    594 #: templates/settings.php:162
    595 msgid "Memory Limit"
    596 msgstr ""
    597 
    598 #: templates/dashboard.php:110
    599 msgid "Time Limit"
    600 msgstr ""
    601 
    602 #: templates/dashboard.php:116
    603 msgid "Storage folder:"
    604 msgstr ""
    605 
    606 #: templates/dashboard.php:122
    607 msgid "Test storage"
    608 msgstr ""
    609 
    610 #: templates/dashboard.php:132
    611 msgid "Standalone Restore"
    612 msgstr ""
    613 
    614 #: templates/dashboard.php:136
    615 msgid "Each backup includes installer.php alongside the archive zip. You can copy both files to an empty domain or localhost and run installer.php in your browser to restore the entire website in 3 steps without pre-installing WordPress."
    616 msgstr ""
    617 
    618 #: templates/dashboard.php:148
    619 msgid "Create a backup"
    620 msgstr ""
    621 
    622 #: templates/dashboard.php:152
    623 msgid "Everything is packed into one archive plus a standalone installer that rebuilds the site on any empty server."
    624 msgstr ""
    625 
    626 #: templates/dashboard.php:156
    627 msgid "JavaScript is required to build backups."
    628 msgstr ""
    629 
    630 #: templates/dashboard.php:163
    631 msgid "Include files"
    632 msgstr ""
    633 
    634 #: templates/dashboard.php:164
    635 msgid "Includes WordPress core files, active themes, plugins, and uploads media library."
    636 msgstr ""
    637 
    638 #: templates/dashboard.php:168
    639 msgid "Include database"
    640 msgstr ""
    641 
    642 #: templates/dashboard.php:169
    643 msgid "Dumps all WordPress database tables into pure standard SQL without relying on mysqldump."
    644 msgstr ""
    645 
    646 #: templates/dashboard.php:175
    647 msgid "Label (optional)"
    648 msgstr ""
    649 
    650 #: templates/dashboard.php:176
    651 msgid "Optional note to identify why this backup was created (e.g. before updating WooCommerce)."
    652 msgstr ""
    653 
    654 #: templates/dashboard.php:178
    655 msgid "Before updating plugins"
    656 msgstr ""
    657 
    658 #: templates/dashboard.php:184
    659 msgid "Create backup"
    660 msgstr ""
    661 
    662 #: templates/dashboard.php:201
    663 msgid "Backup in Progress"
    664 msgstr ""
    665 
    666 #: templates/dashboard.php:205
    667 msgid "Cancel backup job"
    668 msgstr ""
    669 
    670 #: templates/dashboard.php:207
    671 msgid "Cancel"
    672 msgstr ""
    673 
    674 #: templates/dashboard.php:216
    675 msgid "Cataloging"
    676 msgstr ""
    677 
    678 #: templates/dashboard.php:220
    679 msgid "Database"
    680 msgstr ""
    681 
    682 #: templates/dashboard.php:224
    683 msgid "Files"
    684 msgstr ""
    685 
    686 #: templates/dashboard.php:228
    687 msgid "Installer"
    688 msgstr ""
    689 
    690 #: templates/dashboard.php:232
    691 msgid "Packaging"
    692 msgstr ""
    693 
    694 #: templates/dashboard.php:245
    695 msgid "Initializing backup job…"
    696 msgstr ""
    697 
    698 #: templates/dashboard.php:257
    699 msgid "Live Activity Feed"
    700 msgstr ""
    701 
    702 #: templates/dashboard.php:258
    703 msgid "RUNNING"
    704 msgstr ""
    705 
    706 #: templates/dashboard.php:261
    707 msgid "Ready to start backup..."
    708 msgstr ""
    709 
    710 #: templates/dashboard.php:268
    711 msgid "The backup process is running in the background. Please keep this browser window open until the operation finishes completely."
    712 msgstr ""
    713 
    714 #: templates/dashboard.php:277
    715 msgid "Recent backups"
    716 msgstr ""
    717 
    718 #: templates/dashboard.php:283
    719 msgid "Created"
    720 msgstr ""
    721 
    722 #: templates/dashboard.php:284
    723 #: templates/dashboard.php:399
    724 msgid "Status"
    725 msgstr ""
    726 
    727 #: templates/dashboard.php:285
    728 #: templates/dashboard.php:403
    729 msgid "Progress"
    730 msgstr ""
    731 
    732 #: templates/dashboard.php:286
    733 msgid "Package name"
    734 msgstr ""
    735 
    736 #: templates/dashboard.php:287
    737 #: templates/dashboard.php:419
    738 msgid "Size"
    739 msgstr ""
    740 
    741 #: templates/dashboard.php:288
    742 msgid "Actions"
    743 msgstr ""
    744 
    745 #: templates/dashboard.php:295
    746 msgid "No backups yet."
    747 msgstr ""
    748 
    749 #: templates/dashboard.php:318
    750 msgid "Click to view log and details"
    751 msgstr ""
    752 
    753 #: templates/dashboard.php:349
    754 #: templates/dashboard.php:423
    755 msgid "Download Archive (.zip)"
    756 msgstr ""
    757 
    758 #: templates/dashboard.php:350
    759 msgid "Download Archive"
    760 msgstr ""
    761 
    762 #: templates/dashboard.php:357
    763 msgid "Download Installer"
    764 msgstr ""
    765 
    766 #: templates/dashboard.php:365
    767 msgid "Download Archive and Installer simultaneously"
    768 msgstr ""
    769 
    770 #: templates/dashboard.php:366
    771 msgid "Download Both"
    772 msgstr ""
    773 
    774 #: templates/dashboard.php:372
    775 msgid "Delete backup package"
    776 msgstr ""
    777 
    778 #: templates/dashboard.php:373
    779 msgid "Delete"
    780 msgstr ""
    781 
    782 #: templates/dashboard.php:392
    783 msgid "Backup Details & Log"
    784 msgstr ""
    785 
    786 #: templates/dashboard.php:394
    787 #: templates/dashboard.php:442
    788 msgid "Close"
    789 msgstr ""
    790 
    791 #: templates/dashboard.php:407
    792 msgid "Date"
    793 msgstr ""
    794 
    795 #: templates/dashboard.php:411
    796 msgid "Message"
    797 msgstr ""
    798 
    799 #: templates/dashboard.php:418
    800 msgid "Package"
    801 msgstr ""
    802 
    803 #: templates/dashboard.php:426
    804 msgid "Download Installer (.php)"
    805 msgstr ""
    806 
    807 #: templates/dashboard.php:433
    808 msgid "Execution Log"
    809 msgstr ""
    810 
    811 #: templates/dashboard.php:436
    812 msgid "Loading logs…"
    813 msgstr ""
    814 
    815 #: templates/settings.php:20
    816 #: templates/settings.php:274
    817 msgid "Archive & Exclusions"
    818 msgstr ""
    819 
    820 #: templates/settings.php:24
    821 #: templates/settings.php:317
    822 msgid "Storage Destination"
    823 msgstr ""
    824 
    825 #: templates/settings.php:28
    826 #: templates/settings.php:354
    827 msgid "Bot Notifications"
    828 msgstr ""
    829 
    830 #: templates/settings.php:32
    831 #: templates/settings.php:526
    832 msgid "Recurring Schedule"
    833 msgstr ""
    834 
    835 #: templates/settings.php:36
    836 #: templates/settings.php:566
    837 msgid "Standalone Installer"
    838 msgstr ""
    839 
    840 #: templates/settings.php:40
    841 msgid "System Status"
    842 msgstr ""
    843 
    844 #: templates/settings.php:44
    845 #: templates/settings.php:596
    846 msgid "Updates & Privacy"
    847 msgstr ""
    848 
    849 #: templates/settings.php:90
    850 msgid "Settings Navigation"
    851 msgstr ""
    852 
    853 #: templates/settings.php:111
    854 msgid "Environment"
    855 msgstr ""
    856 
    857 #: templates/settings.php:124
    858 msgid "Storage Status"
    859 msgstr ""
    860 
    861 #: templates/settings.php:126
    862 msgid "Writable"
    863 msgstr ""
    864 
    865 #: templates/settings.php:126
    866 msgid "Protected"
    867 msgstr ""
    868 
    869 #: templates/settings.php:141
    870 msgid "System Status & Diagnostics"
    871 msgstr ""
    872 
    873 #: templates/settings.php:145
    874 msgid "Live diagnostic health report of active server extensions, filesystem permissions, and system stability."
    875 msgstr ""
    876 
    877 #: templates/settings.php:156
    878 msgid "Compatible"
    879 msgstr ""
    880 
    881 #: templates/settings.php:165
    882 #: templates/settings.php:174
    883 msgid "OK"
    884 msgstr ""
    885 
    886 #: templates/settings.php:171
    887 msgid "Execution Timeout"
    888 msgstr ""
    889 
    890 #: templates/settings.php:180
    891 msgid "ZipArchive"
    892 msgstr ""
    893 
    894 #: templates/settings.php:181
    895 msgid "Enabled"
    896 msgstr ""
    897 
    898 #: templates/settings.php:181
    899 msgid "PclZip fallback"
    900 msgstr ""
    901 
    902 #: templates/settings.php:183
    903 msgid "Ready"
    904 msgstr ""
    905 
    906 #: templates/settings.php:189
    907 msgid "Database Driver"
    908 msgstr ""
    909 
    910 #: templates/settings.php:192
    911 msgid "Streaming"
    912 msgstr ""
    913 
    914 #: templates/settings.php:198
    915 msgid "OpenSSL"
    916 msgstr ""
    917 
    918 #: templates/settings.php:199
    919 msgid "Active"
    920 msgstr ""
    921 
    922 #: templates/settings.php:199
    923 msgid "Inactive"
    924 msgstr ""
    925 
    926 #: templates/settings.php:201
    927 msgid "Encrypted"
    928 msgstr ""
    929 
    930 #: templates/settings.php:209
    931 msgid "Backup Storage Destination"
    932 msgstr ""
    933 
    934 #: templates/settings.php:212
    935 msgid "Isolated, protected path used to safely store archive files away from public access:"
    936 msgstr ""
    937 
    938 #: templates/settings.php:218
    939 msgid "Run Storage Write Test"
    940 msgstr ""
    941 
    942 #: templates/settings.php:229
    943 msgid "System & Activity Log Stream"
    944 msgstr ""
    945 
    946 #: templates/settings.php:233
    947 msgid "Refresh"
    948 msgstr ""
    949 
    950 #: templates/settings.php:243
    951 msgid "System Activity Log (Last 100 entries)"
    952 msgstr ""
    953 
    954 #: templates/settings.php:251
    955 msgid "No recent log entries found."
    956 msgstr ""
    957 
    958 #: templates/settings.php:277
    959 msgid "Configure which files, folders, or sizes should be skipped during backup creation to save disk space and maximize speed."
    960 msgstr ""
    961 
    962 #: templates/settings.php:282
    963 msgid "Excluded paths and patterns (one per line)"
    964 msgstr ""
    965 
    966 #: templates/settings.php:283
    967 msgid "Folders or file patterns that will be excluded from the backup archive (e.g. wp-content/cache/, *.mp4)."
    968 msgstr ""
    969 
    970 #: templates/settings.php:287
    971 msgid "Examples: wp-content/uploads/2022/, *.mp4, node_modules/. Cache and backup folders are always skipped automatically."
    972 msgstr ""
    973 
    974 #: templates/settings.php:294
    975 msgid "Skip files larger than (MB, 0 = no limit)"
    976 msgstr ""
    977 
    978 #: templates/settings.php:295
    979 msgid "Files exceeding this size threshold will be skipped to keep backups fast and reliable. Enter 0 for no limit."
    980 msgstr ""
    981 
    982 #: templates/settings.php:303
    983 msgid "Files packed per request"
    984 msgstr ""
    985 
    986 #: templates/settings.php:304
    987 msgid "Batch size for slicing file packing per tick. Default 1000 files ensures fast backup on modern systems."
    988 msgstr ""
    989 
    990 #: templates/settings.php:320
    991 msgid "Backup archives and standalone installers are stored locally in a secure, protected directory on your server."
    992 msgstr ""
    993 
    994 #: templates/settings.php:325
    995 msgid "Primary Destination Driver"
    996 msgstr ""
    997 
    998 #: templates/settings.php:326
    999 msgid "Primary storage destination for completed packages. Local protected storage is used."
    1000 msgstr ""
    1001 
    1002 #: templates/settings.php:340
    1003 msgid "Protected Directory Path"
    1004 msgstr ""
    1005 
    1006 #: templates/settings.php:344
    1007 msgid "This location contains an .htaccess file blocking direct HTTP requests and indexing for maximum security."
    1008 msgstr ""
    1009 
    1010 #: templates/settings.php:357
    1011 msgid "Backupino can announce every finished backup, with the permanent download link, in Telegram or Bale. You can enable either or both messengers simultaneously."
    1012 msgstr ""
    1013 
    1014 #: templates/settings.php:365
    1015 msgid "Telegram Notification"
    1016 msgstr ""
    1017 
    1018 #: templates/settings.php:369
    1019 msgid "Enable Telegram"
    1020 msgstr ""
    1021 
    1022 #: templates/settings.php:375
    1023 msgid "Telegram Bot Token"
    1024 msgstr ""
    1025 
    1026 #: templates/settings.php:376
    1027 msgid "Bot token obtained from Telegram @BotFather."
    1028 msgstr ""
    1029 
    1030 #: templates/settings.php:384
    1031 msgid "Telegram Chat ID"
    1032 msgstr ""
    1033 
    1034 #: templates/settings.php:385
    1035 msgid "Telegram numeric chat or channel ID."
    1036 msgstr ""
    1037 
    1038 #: templates/settings.php:395
    1039 msgid "Test Telegram"
    1040 msgstr ""
    1041 
    1042 #: templates/settings.php:406
    1043 msgid "Bale Notification"
    1044 msgstr ""
    1045 
    1046 #: templates/settings.php:410
    1047 msgid "Enable Bale"
    1048 msgstr ""
    1049 
    1050 #: templates/settings.php:416
    1051 msgid "Bale Bot Token"
    1052 msgstr ""
    1053 
    1054 #: templates/settings.php:417
    1055 msgid "Bot token obtained from Bale @BotFather."
    1056 msgstr ""
    1057 
    1058 #: templates/settings.php:425
    1059 msgid "Bale Chat ID"
    1060 msgstr ""
    1061 
    1062 #: templates/settings.php:426
    1063 msgid "Bale numeric chat or channel ID."
    1064 msgstr ""
    1065 
    1066 #: templates/settings.php:436
    1067 msgid "Test Bale"
    1068 msgstr ""
    1069 
    1070 #: templates/settings.php:446
    1071 msgid "Backup Message Template"
    1072 msgstr ""
    1073 
    1074 #: templates/settings.php:449
    1075 msgid "Message template sent to messengers when a backup finishes."
    1076 msgstr ""
    1077 
    1078 #: templates/settings.php:460
    1079 #: templates/settings.php:492
    1080 msgid "Available tags:"
    1081 msgstr ""
    1082 
    1083 #: templates/settings.php:462
    1084 #: templates/settings.php:494
    1085 msgid "Site Name"
    1086 msgstr ""
    1087 
    1088 #: templates/settings.php:463
    1089 msgid "Backup Contents"
    1090 msgstr ""
    1091 
    1092 #: templates/settings.php:464
    1093 msgid "Backup Size"
    1094 msgstr ""
    1095 
    1096 #: templates/settings.php:465
    1097 msgid "Backup Date"
    1098 msgstr ""
    1099 
    1100 #: templates/settings.php:466
    1101 msgid "Download Link"
    1102 msgstr ""
    1103 
    1104 #: templates/settings.php:469
    1105 #: templates/settings.php:500
    1106 msgid "HTML formatting tags such as <b>bold</b> and <a href=\"...\">links</a> are supported."
    1107 msgstr ""
    1108 
    1109 #: templates/settings.php:478
    1110 msgid "Restoration Message Template"
    1111 msgstr ""
    1112 
    1113 #: templates/settings.php:481
    1114 msgid "Message template sent to messengers when the site is restored using the installer."
    1115 msgstr ""
    1116 
    1117 #: templates/settings.php:495
    1118 msgid "New Site URL"
    1119 msgstr ""
    1120 
    1121 #: templates/settings.php:496
    1122 msgid "Admin Login URL"
    1123 msgstr ""
    1124 
    1125 #: templates/settings.php:497
    1126 msgid "Restoration Date"
    1127 msgstr ""
    1128 
    1129 #. translators: %d: number of queued messages.
    1130 #: templates/settings.php:512
    1131 #, php-format
    1132 msgid "%d message is waiting to be resent on the next scheduled run."
    1133 msgid_plural "%d messages are waiting to be resent on the next scheduled run."
    1134 msgstr[0] ""
    1135 msgstr[1] ""
    1136 
    1137 #: templates/settings.php:529
    1138 msgid "Automatic recurring backups trigger via WordPress cron. In Persian locale, monthly schedules automatically align with the start of the Jalali month."
    1139 msgstr ""
    1140 
    1141 #: templates/settings.php:534
    1142 msgid "Run automatic backups"
    1143 msgstr ""
    1144 
    1145 #: templates/settings.php:535
    1146 msgid "Enables recurring background backup jobs using WordPress built-in WP-Cron scheduler."
    1147 msgstr ""
    1148 
    1149 #: templates/settings.php:541
    1150 msgid "Frequency"
    1151 msgstr ""
    1152 
    1153 #: templates/settings.php:542
    1154 msgid "Monthly execution triggers on the 1st of each Persian/Gregorian month based on site language."
    1155 msgstr ""
    1156 
    1157 #: templates/settings.php:546
    1158 msgid "Monthly (first day of the month)"
    1159 msgstr ""
    1160 
    1161 #: templates/settings.php:553
    1162 msgid "Keep at most (backups)"
    1163 msgstr ""
    1164 
    1165 #: templates/settings.php:554
    1166 msgid "Maximum number of recent backups to keep on disk. Older packages are automatically pruned to save space."
    1167 msgstr ""
    1168 
    1169 #: templates/settings.php:569
    1170 msgid "Configure preset credentials for the standalone migration installer generated with each backup."
    1171 msgstr ""
    1172 
    1173 #: templates/settings.php:575
    1174 msgid "Installer password (optional)"
    1175 msgstr ""
    1176 
    1177 #: templates/settings.php:576
    1178 msgid "Password protecting installer.php when accessed via browser during migration or restoration."
    1179 msgstr ""
    1180 
    1181 #: templates/settings.php:583
    1182 msgid "Default new URL (optional)"
    1183 msgstr ""
    1184 
    1185 #: templates/settings.php:584
    1186 msgid "Preset target URL for search & replace when migrating to a known new domain."
    1187 msgstr ""
    1188 
    1189 #: templates/settings.php:600
    1190 msgid "Receive critical security notices, product updates, and roadmap announcements (opt-in)."
    1191 msgstr ""
    1192 
    1193 #: templates/settings.php:601
    1194 msgid "100% privacy-compliant: zero tracking, zero telemetry, strictly optional notifications."
    1195 msgstr ""
    1196 
    1197 #: templates/settings.php:604
    1198 msgid "We respect your privacy. No telemetry or personal data is collected or sent without your explicit consent."
    1199 msgstr ""
    1200 
    1201 #: templates/settings.php:611
    1202 msgid "Current Version:"
    1203 msgstr ""
    1204 
    1205 #: templates/settings.php:612
    1206 msgid "Plugin updates are delivered securely through the official WordPress repository."
    1207 msgstr ""
    1208 
    1209 #: templates/settings.php:623
    1210 msgid "Save settings"
    1211 msgstr ""
  • backupino/tags/1.1.0/readme.txt

    r3800361 r3809656  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.0.5
     7Stable tag: 1.1.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    7676
    7777= Where are backup packages stored? =
    78 Packages are stored locally in `/wp-content/backupino/packages/` (outside of the public uploads directory for enhanced security and isolation). The directory is secured with `.htaccess`, `web.config`, and empty `index.php` guards to prevent direct public file browsing and execution.
     78Packages are stored locally in `backupino/packages/` inside your site's configured WordPress uploads directory (`basedir` returned by `wp_upload_dir()`, which is typically under `wp-content/uploads/backupino/packages/` on default installations, though the full path may vary on sites with a custom uploads directory). If `wp_upload_dir()` does not return a `basedir`, Backupino falls back to `backupino/packages/` inside `WP_CONTENT_DIR`.
     79
     80Backupino writes `.htaccess` (for Apache/LiteSpeed), `web.config` (for IIS), and `index.html` (which only prevents directory listing) inside its storage directories. **Important for Nginx:** Nginx ignores `.htaccess` and `web.config`, and `index.html` does not block direct requests to a known package URL. On Nginx (or Nginx reverse proxies serving static files), direct HTTP access to backup files is **not guaranteed to be blocked** until you add a server-level deny rule inside your Nginx `server { }` block (adjusting the path if your uploads directory is customized) and reload Nginx:
     81
     82`location ^~ /wp-content/uploads/backupino/ { deny all; return 403; }`
     83
     84Authorized downloads through Backupino's WordPress admin screen and permanent download link are streamed via PHP and continue working normally with this rule enabled.
    7985
    8086= Does the permanent download link ever expire? =
    … …  
    101107== Upgrade Notice ==
    102108
     109= 1.1.0 =
     110Feature and enhancement release. Adds optional WordPress administrator account creation during standalone restore, restores animated plugin icon, hands off translations to GlotPress, and updates translation catalog.
     111
    103112= 1.0.5 =
    104113Bundled full Persian (fa_IR) localization, static PNG/SVG directory icons, and clean .distignore distribution packaging.
    105114
    106115= 1.0.4 =
    107 Security, compliance, and platform hardening release addressing WordPress.org directory requirements.
     116Security and compliance update. Eliminates unconsented public attributions, replaces error_reporting and raw cURL with WordPress-standard mechanisms, replaces mysqli with PDO prepared statements, quarantines web server configs, and heals table prefix casing.
    108117
    109118= 1.0.3 =
    … …  
    120129
    121130== Changelog ==
     131
     132= 1.1.0 =
     133* Feature: Added optional new WordPress Administrator account creation during restoration in the standalone installer with secure password hashing and capability assignment.
     134* UI: Restored SMIL animated SVG plugin icon for enhanced branding while maintaining crisp high-resolution display.
     135* i18n: Removed bundled local Persian .po/.mo translation files in favor of official WordPress.org GlotPress language packs (translate.wordpress.org).
     136* i18n: Updated backupino.pot catalog with all newly introduced installer strings.
    122137
    123138= 1.0.5 =
  • backupino/tags/1.1.0/src/Backup/InstallerBuilder.php

    r3800274 r3809656  
    4040                'UrlRewrite.php',
    4141                'ConfigWriter.php',
     42                'AdminCreator.php',
    4243                'View.php',
    4344        );
    … …  
    113114
    114115                $template = (string) file_get_contents( $template_path ); // phpcs:ignore WordPress.WP.AlternativeFunctions
     116
     117                // Ensure an independent server-only secret for state encryption and session signing
     118                // that is never derived from or equal to the browser-facing CSRF token.
     119                $existing_secret = isset( $payload['state_secret'] ) ? (string) $payload['state_secret'] : '';
     120                $public_token    = isset( $payload['token'] ) ? (string) $payload['token'] : '';
     121                if ( strlen( $existing_secret ) < 32 || ( '' !== $public_token && hash_equals( $public_token, $existing_secret ) ) ) {
     122                        $payload['state_secret'] = bin2hex( random_bytes( 32 ) );
     123                }
    115124
    116125                $json = function_exists( 'wp_json_encode' ) ? wp_json_encode( $payload ) : json_encode( $payload );
    … …  
    178187
    179188                $defaults = array(
    180                         'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.0.4',
     189                        'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.1.0',
    181190                        'name'         => $name,
    182191                        'token'        => \Backupino\Support\Str::random( 16 ),
  • backupino/tags/1.1.0/src/Backup/Stages/FinalizeStage.php

    r3800274 r3809656  
    176176                $meta = array(
    177177                        'generator'    => 'Backupino',
    178                         'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.0.0',
     178                        'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.1.0',
    179179                        'created'      => $context->clock()->now_mysql(),
    180180                        'site_url'     => home_url(),
    … …  
    207207
    208208                $payload = array(
    209                         'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.0.4',
     209                        'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.1.0',
    210210                        'name'         => $name,
    211211                        'token'        => Str::random( 16 ),
  • backupino/tags/1.1.0/src/Core/Compatibility.php

    r3800274 r3809656  
    105105                }
    106106
     107                if ( self::is_nginx() ) {
     108                        $warnings[] = __( 'Nginx web server detected: Nginx ignores .htaccess and web.config files, and index.html only hides directory listing. Direct HTTP access to backup files is NOT guaranteed to be blocked until your server administrator adds the server-level Nginx deny rule in Backupino -> Settings -> Storage Destination and reloads Nginx. Backupino cannot automatically alter or reload Nginx configuration.', 'backupino' );
     109                }
     110
    107111                return $warnings;
     112        }
     113
     114        /**
     115         * Detect whether the current request is served behind Nginx (best-effort).
     116         *
     117         * Note: Detection is purely informational and best-effort. Reverse proxies
     118         * or caching servers sitting in front of Apache or PHP-FPM might not advertise
     119         * Nginx in SERVER_SOFTWARE. User-controlled request headers (such as HTTP_X_*)
     120         * are intentionally NOT trusted for security reasons.
     121         *
     122         * @param string|null $server_software Optional SERVER_SOFTWARE override for testing.
     123         * @return bool
     124         */
     125        public static function is_nginx( ?string $server_software = null ): bool {
     126                if ( null === $server_software ) {
     127                        if ( isset( $GLOBALS['is_nginx'] ) && true === $GLOBALS['is_nginx'] ) {
     128                                return true;
     129                        }
     130                        // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Read-only server banner check.
     131                        $server_software = isset( $_SERVER['SERVER_SOFTWARE'] ) ? (string) wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) : '';
     132                }
     133
     134                return false !== stripos( $server_software, 'nginx' );
     135        }
     136
     137        /**
     138         * Extract canonical origin components (scheme, host, effective port) from an absolute URL.
     139         *
     140         * Returns null if the URL is relative, protocol-relative, invalid, or has an unsupported scheme.
     141         *
     142         * @param string $url URL to parse.
     143         * @return array{scheme: string, host: string, port: int}|null
     144         */
     145        public static function extract_origin( string $url ): ?array {
     146                $trimmed = trim( $url );
     147                if ( '' === $trimmed || 0 === strpos( $trimmed, '//' ) ) {
     148                        return null;
     149                }
     150
     151                $parts = wp_parse_url( $trimmed );
     152                if ( false === $parts || ! is_array( $parts ) ) {
     153                        return null;
     154                }
     155
     156                $scheme = isset( $parts['scheme'] ) ? strtolower( (string) $parts['scheme'] ) : '';
     157                $host   = isset( $parts['host'] ) ? strtolower( (string) $parts['host'] ) : '';
     158
     159                if ( '' === $scheme || '' === $host || ! in_array( $scheme, array( 'http', 'https' ), true ) ) {
     160                        return null;
     161                }
     162
     163                if ( isset( $parts['port'] ) ) {
     164                        if ( ! is_int( $parts['port'] ) && ! ctype_digit( (string) $parts['port'] ) ) {
     165                                return null;
     166                        }
     167                        $port = (int) $parts['port'];
     168                        if ( $port < 1 || $port > 65535 ) {
     169                                return null;
     170                        }
     171                } else {
     172                        $port = 'https' === $scheme ? 443 : 80;
     173                }
     174
     175                return array(
     176                        'scheme' => $scheme,
     177                        'host'   => $host,
     178                        'port'   => $port,
     179                );
     180        }
     181
     182        /**
     183         * Detailed inspection of Nginx storage protection and location block generation.
     184         *
     185         * Only generates a concrete `location ^~` directive when the storage web path can be
     186         * reliably and safely determined relative to ABSPATH or the site/home URL (same-origin).
     187         * If uploads point to an external CDN, a different host, or an indeterminate path,
     188         * status is set to 'manual' to prevent displaying inaccurate or misleading Nginx rules.
     189         *
     190         * Output paths are strictly sanitized to prevent directive injection, newlines, and traversal.
     191         *
     192         * @param Paths $paths Storage layout.
     193         * @return array{status: string, rule: string, web_path: string, fs_path: string, reason: string}
     194         */
     195        public static function nginx_storage_info( Paths $paths ): array {
     196                $base    = rtrim( str_replace( '\\', '/', $paths->base() ), '/' );
     197                $root    = rtrim( str_replace( '\\', '/', $paths->root() ), '/' );
     198                $fs_path = $paths->packages();
     199
     200                $uploads_baseurl = '';
     201                $uploads_basedir = '';
     202                if ( function_exists( 'wp_upload_dir' ) ) {
     203                        $uploads         = wp_upload_dir( null, false );
     204                        $uploads_baseurl = isset( $uploads['baseurl'] ) ? (string) $uploads['baseurl'] : '';
     205                        $uploads_basedir = isset( $uploads['basedir'] ) ? rtrim( str_replace( '\\', '/', (string) $uploads['basedir'] ), '/' ) : '';
     206                }
     207
     208                $candidate_path = '';
     209
     210                // 1. Primary resolution: If base is inside wp_upload_dir basedir, map through baseurl.
     211                $is_inside_uploads = '' !== $uploads_basedir && ( $base === $uploads_basedir || 0 === strpos( $base, $uploads_basedir . '/' ) );
     212                if ( $is_inside_uploads ) {
     213                        $trimmed_baseurl = trim( $uploads_baseurl );
     214                        if ( '' === $trimmed_baseurl ) {
     215                                return array(
     216                                        'status'   => 'manual',
     217                                        'rule'     => '',
     218                                        'web_path' => '',
     219                                        'fs_path'  => $fs_path,
     220                                        'reason'   => 'invalid_baseurl',
     221                                );
     222                        }
     223
     224                        // Reject protocol-relative URLs (e.g. //cdn.example.org/uploads).
     225                        if ( 0 === strpos( $trimmed_baseurl, '//' ) ) {
     226                                return array(
     227                                        'status'   => 'manual',
     228                                        'rule'     => '',
     229                                        'web_path' => '',
     230                                        'fs_path'  => $fs_path,
     231                                        'reason'   => 'protocol_relative',
     232                                );
     233                        }
     234
     235                        $parsed_baseurl = wp_parse_url( $trimmed_baseurl );
     236                        if ( false === $parsed_baseurl || ! is_array( $parsed_baseurl ) ) {
     237                                return array(
     238                                        'status'   => 'manual',
     239                                        'rule'     => '',
     240                                        'web_path' => '',
     241                                        'fs_path'  => $fs_path,
     242                                        'reason'   => 'malformed_baseurl',
     243                                );
     244                        }
     245
     246                        // Reject unexpected query, fragment, or user credentials in baseurl.
     247                        if ( isset( $parsed_baseurl['query'] ) || isset( $parsed_baseurl['fragment'] ) || isset( $parsed_baseurl['user'] ) || isset( $parsed_baseurl['pass'] ) ) {
     248                                return array(
     249                                        'status'   => 'manual',
     250                                        'rule'     => '',
     251                                        'web_path' => '',
     252                                        'fs_path'  => $fs_path,
     253                                        'reason'   => 'unexpected_url_components',
     254                                );
     255                        }
     256
     257                        $upload_path = isset( $parsed_baseurl['path'] ) ? (string) $parsed_baseurl['path'] : '';
     258                        $is_absolute = isset( $parsed_baseurl['scheme'] ) || isset( $parsed_baseurl['host'] );
     259
     260                        if ( $is_absolute ) {
     261                                $upload_origin = self::extract_origin( $trimmed_baseurl );
     262                                if ( null === $upload_origin ) {
     263                                        return array(
     264                                                'status'   => 'manual',
     265                                                'rule'     => '',
     266                                                'web_path' => '',
     267                                                'fs_path'  => $fs_path,
     268                                                'reason'   => 'invalid_origin',
     269                                        );
     270                                }
     271
     272                                // Resolve expected site origins from home_url() and site_url().
     273                                $home_url    = function_exists( 'home_url' ) ? (string) home_url() : '';
     274                                $site_url    = function_exists( 'site_url' ) ? (string) site_url() : '';
     275                                $home_origin = '' !== $home_url ? self::extract_origin( $home_url ) : null;
     276                                $site_origin = '' !== $site_url ? self::extract_origin( $site_url ) : null;
     277
     278                                // Fail closed if neither home_url nor site_url provides a valid origin to verify against.
     279                                if ( null === $home_origin && null === $site_origin ) {
     280                                        return array(
     281                                                'status'   => 'manual',
     282                                                'rule'     => '',
     283                                                'web_path' => '',
     284                                                'fs_path'  => $fs_path,
     285                                                'reason'   => 'missing_expected_origin',
     286                                        );
     287                                }
     288
     289                                // Check exact same-origin match (scheme, hostname, effective port).
     290                                $matches_home = null !== $home_origin &&
     291                                        $upload_origin['scheme'] === $home_origin['scheme'] &&
     292                                        $upload_origin['host'] === $home_origin['host'] &&
     293                                        $upload_origin['port'] === $home_origin['port'];
     294
     295                                $matches_site = null !== $site_origin &&
     296                                        $upload_origin['scheme'] === $site_origin['scheme'] &&
     297                                        $upload_origin['host'] === $site_origin['host'] &&
     298                                        $upload_origin['port'] === $site_origin['port'];
     299
     300                                if ( ! $matches_home && ! $matches_site ) {
     301                                        return array(
     302                                                'status'   => 'manual',
     303                                                'rule'     => '',
     304                                                'web_path' => '',
     305                                                'fs_path'  => $fs_path,
     306                                                'reason'   => 'origin_mismatch',
     307                                        );
     308                                }
     309                        } else {
     310                                // Relative URL: must start strictly with '/' and not contain scheme markers or traversal.
     311                                if ( '' === $upload_path || 0 !== strpos( $upload_path, '/' ) ) {
     312                                        return array(
     313                                                'status'   => 'manual',
     314                                                'rule'     => '',
     315                                                'web_path' => '',
     316                                                'fs_path'  => $fs_path,
     317                                                'reason'   => 'invalid_relative_path',
     318                                        );
     319                                }
     320                        }
     321
     322                        if ( '' === trim( $upload_path ) ) {
     323                                return array(
     324                                        'status'   => 'manual',
     325                                        'rule'     => '',
     326                                        'web_path' => '',
     327                                        'fs_path'  => $fs_path,
     328                                        'reason'   => 'invalid_path',
     329                                );
     330                        }
     331
     332                        $rel_to_upload  = substr( $base, strlen( $uploads_basedir ) );
     333                        $candidate_path = rtrim( $upload_path, '/' ) . '/' . ltrim( $rel_to_upload, '/' );
     334                } elseif ( '' !== $root && ( $base === $root || 0 === strpos( $base, $root . '/' ) ) ) {
     335                        // 2. Fallback resolution: If base is directly inside ABSPATH / root.
     336                        $rel_to_root = substr( $base, strlen( $root ) );
     337                        $site_ref    = function_exists( 'site_url' ) && '' !== (string) site_url()
     338                                ? (string) site_url()
     339                                : ( function_exists( 'home_url' ) ? (string) home_url() : '' );
     340                        $site_path   = (string) wp_parse_url( $site_ref, PHP_URL_PATH );
     341                        $site_path   = '/' . trim( $site_path, '/' );
     342
     343                        if ( '/' !== $site_path && '' !== $site_path && 0 !== strpos( $rel_to_root, $site_path . '/' ) ) {
     344                                $candidate_path = rtrim( $site_path, '/' ) . '/' . ltrim( $rel_to_root, '/' );
     345                        } else {
     346                                $candidate_path = '/' . ltrim( $rel_to_root, '/' );
     347                        }
     348                }
     349
     350                // If candidate path cannot be determined or resolved relative to webroot, require manual configuration.
     351                if ( '' === $candidate_path ) {
     352                        return array(
     353                                'status'   => 'manual',
     354                                'rule'     => '',
     355                                'web_path' => '',
     356                                'fs_path'  => $fs_path,
     357                                'reason'   => 'outside_root',
     358                        );
     359                }
     360
     361                // 3. Strict security validation: reject control characters, newlines, NUL bytes, directive injection, and traversal.
     362                if ( false !== strpos( $candidate_path, "\n" ) ||
     363                     false !== strpos( $candidate_path, "\r" ) ||
     364                     false !== strpos( $candidate_path, "\0" ) ||
     365                     false !== strpos( $candidate_path, ';' ) ||
     366                     false !== strpos( $candidate_path, '{' ) ||
     367                     false !== strpos( $candidate_path, '}' ) ) {
     368                        return array(
     369                                'status'   => 'manual',
     370                                'rule'     => '',
     371                                'web_path' => '',
     372                                'fs_path'  => $fs_path,
     373                                'reason'   => 'unsafe_chars',
     374                        );
     375                }
     376
     377                // Reject any path segment containing '.' or '..' traversal, or empty segments.
     378                $segments = explode( '/', trim( $candidate_path, '/' ) );
     379                foreach ( $segments as $seg ) {
     380                        if ( '' === $seg || '.' === $seg || '..' === $seg ) {
     381                                return array(
     382                                        'status'   => 'manual',
     383                                        'rule'     => '',
     384                                        'web_path' => '',
     385                                        'fs_path'  => $fs_path,
     386                                        'reason'   => 'traversal',
     387                                );
     388                        }
     389                }
     390
     391                // Strictly validate characters: Never mutate or strip characters silently.
     392                // If the candidate path contains any characters outside [A-Za-z0-9/_.-] (such as %20, spaces, etc.),
     393                // refuse to generate a misleading rule and fail closed to manual status.
     394                if ( 1 !== preg_match( '#^[A-Za-z0-9/_.\-]+$#', $candidate_path ) ) {
     395                        return array(
     396                                'status'   => 'manual',
     397                                'rule'     => '',
     398                                'web_path' => '',
     399                                'fs_path'  => $fs_path,
     400                                'reason'   => 'disallowed_chars',
     401                        );
     402                }
     403
     404                $trimmed = trim( $candidate_path, '/' );
     405
     406                // Prevent matching the entire document root or invalid short paths.
     407                if ( '' === $trimmed || strlen( $trimmed ) < 2 ) {
     408                        return array(
     409                                'status'   => 'manual',
     410                                'rule'     => '',
     411                                'web_path' => '',
     412                                'fs_path'  => $fs_path,
     413                                'reason'   => 'root_path',
     414                        );
     415                }
     416
     417                $web_path = '/' . $trimmed . '/';
     418                $rule     = "location ^~ {$web_path} {\n    deny all;\n    return 403;\n}";
     419
     420                return array(
     421                        'status'   => 'exact',
     422                        'rule'     => $rule,
     423                        'web_path' => $web_path,
     424                        'fs_path'  => $fs_path,
     425                        'reason'   => 'ok',
     426                );
     427        }
     428
     429        /**
     430         * Build an Nginx server-block location rule denying direct HTTP access to the
     431         * Backupino storage directory. Uses `^~` so static-file regex rules cannot bypass it.
     432         *
     433         * Returns empty string if the web path cannot be reliably determined (e.g. external CDN or custom mapping).
     434         *
     435         * @param Paths $paths Storage layout.
     436         * @return string
     437         */
     438        public static function nginx_storage_rule( Paths $paths ): string {
     439                $info = self::nginx_storage_info( $paths );
     440                return $info['rule'];
    108441        }
    109442
    … …  
    115448         */
    116449        public static function snapshot( Paths $paths ): array {
     450                $nginx_info = self::nginx_storage_info( $paths );
     451
    117452                return array(
    118                         'php_version'      => PHP_VERSION,
    119                         'wp_version'       => function_exists( 'get_bloginfo' ) ? get_bloginfo( 'version' ) : '',
    120                         'memory_limit'     => (string) ini_get( 'memory_limit' ),
    121                         'max_execution'    => (int) ini_get( 'max_execution_time' ),
    122                         'post_max_size'    => (string) ini_get( 'post_max_size' ),
    123                         'disk_free'        => Fs::free_space( $paths->base() ),
    124                         'zip'              => class_exists( 'ZipArchive' ),
    125                         'openssl'          => extension_loaded( 'openssl' ),
    126                         'curl'             => extension_loaded( 'curl' ),
    127                         'suhosin'          => extension_loaded( 'suhosin' ),
    128                         'storage_writable' => Fs::is_writable_dir( $paths->base() ),
    129                         'storage_path'     => $paths->base(),
    130                         'blocking'         => self::blocking_issues(),
    131                         'warnings'         => self::warnings(),
     453                        'php_version'        => PHP_VERSION,
     454                        'wp_version'         => function_exists( 'get_bloginfo' ) ? get_bloginfo( 'version' ) : '',
     455                        'memory_limit'       => (string) ini_get( 'memory_limit' ),
     456                        'max_execution'      => (int) ini_get( 'max_execution_time' ),
     457                        'post_max_size'      => (string) ini_get( 'post_max_size' ),
     458                        'disk_free'          => Fs::free_space( $paths->base() ),
     459                        'zip'                => class_exists( 'ZipArchive' ),
     460                        'openssl'            => extension_loaded( 'openssl' ),
     461                        'curl'               => extension_loaded( 'curl' ),
     462                        'suhosin'            => extension_loaded( 'suhosin' ),
     463                        'is_nginx'           => self::is_nginx(),
     464                        'nginx_rule'         => $nginx_info['rule'],
     465                        'nginx_storage_info' => $nginx_info,
     466                        'storage_writable'   => Fs::is_writable_dir( $paths->base() ),
     467                        'storage_path'       => $paths->base(),
     468                        'blocking'           => self::blocking_issues(),
     469                        'warnings'           => self::warnings(),
    132470                );
    133471        }
  • backupino/tags/1.1.0/src/Core/Paths.php

    r3800274 r3809656  
    2323
    2424        /**
    25          * Storage root (`wp-content/backupino` by default).
     25         * Storage root (`backupino` under the configured WordPress uploads `basedir`,
     26         * or `WP_CONTENT_DIR/backupino` if `basedir` is unavailable).
    2627         *
    2728         * @var string
    … …  
    5051         * Build from the current WordPress environment.
    5152         *
    52          * Uses wp-content/backupino outside of public uploads for enhanced security and isolation,
    53          * with automatic fallback to uploads directory if wp-content is not writable.
     53         * Resolves the storage root to `<basedir>/backupino` using `wp_upload_dir()`
     54         * whenever a non-empty `basedir` is returned, falling back to
     55         * `WP_CONTENT_DIR . '/backupino'` (or `ABSPATH . 'wp-content/backupino'`)
     56         * when `wp_upload_dir()` is unavailable or returns an empty `basedir`.
    5457         *
    5558         * @return self
  • backupino/tags/1.1.0/src/Download/PublicDownload.php

    r3800274 r3809656  
    249249                        : plugins_url( 'assets/js/public-download.js', dirname( dirname( __DIR__ ) ) . '/backupino.php' );
    250250
    251                 wp_register_style( 'backupino-public-download', $css_url, array(), defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.0.4' );
     251                wp_register_style( 'backupino-public-download', $css_url, array(), defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.1.0' );
    252252                $inline_css = ':root { ' . $css_vars . ' } ' . $custom_styles;
    253253                wp_add_inline_style( 'backupino-public-download', $inline_css );
    254254                wp_enqueue_style( 'backupino-public-download' );
    255255
    256                 wp_register_script( 'backupino-public-download', $js_url, array(), defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.0.4', true );
     256                wp_register_script( 'backupino-public-download', $js_url, array(), defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.1.0', true );
    257257                wp_enqueue_script( 'backupino-public-download' );
    258258
  • backupino/tags/1.1.0/src/Installer/State.php

    r3800274 r3809656  
    1313
    1414// phpcs:disable WordPress.WP.AlternativeFunctions -- Standalone installer running outside WordPress environment.
     15// phpcs:disable WordPress.Security.EscapeOutput.ExceptionNotEscaped -- Offline standalone installer exceptions.
    1516
    1617/**
    17  * Stores wizard progress between AJAX requests.
     18 * Stores wizard progress between AJAX requests inside a per-run private `0700`
     19 * directory strictly outside the web document root, wrapped in an executable
     20 * PHP 403 guard and authenticated encryption using a server-only secret.
    1821 */
    1922final class State {
    2023
    2124        /**
     25         * Executable PHP guard prepended to every state file so direct HTTP access
     26         * fails closed even on misconfigured web servers (Apache, Nginx, IIS).
     27         *
     28         * @var string
     29         */
     30        public const GUARD_PREFIX = "<?php http_response_code( 403 ); exit; ?>\n";
     31
     32        /**
     33         * Prefix for per-run private state directories.
     34         *
     35         * @var string
     36         */
     37        public const RUN_DIR_PREFIX = 'backupino-run-';
     38
     39        /**
     40         * Filename of the state file inside a private run directory.
     41         *
     42         * @var string
     43         */
     44        public const STATE_FILENAME = 'state.php';
     45
     46        /**
    2247         * Absolute path of the state file.
    2348         *
    … …  
    2752
    2853        /**
     54         * Absolute path of the private per-run directory (when managed as a private run).
     55         *
     56         * @var string
     57         */
     58        private $run_dir;
     59
     60        /**
     61         * Opaque signed run handle (nonce.hmac) referencing the private run directory.
     62         *
     63         * @var string
     64         */
     65        private $run_handle;
     66
     67        /**
     68         * Server-only secret key used for authenticated encryption at rest.
     69         *
     70         * @var string
     71         */
     72        private $secret;
     73
     74        /**
     75         * When true, corrupted, tampered, or undecryptable state fails closed by throwing.
     76         *
     77         * @var bool
     78         */
     79        private $strict;
     80
     81        /**
    2982         * State data.
    3083         *
    … …  
    3689         * Constructor.
    3790         *
    38          * @param string $file Absolute path.
    39          */
    40         public function __construct( string $file ) {
    41                 $this->file = $file;
     91         * @param string $file       Absolute path of the state file.
     92         * @param string $secret     Optional server-only secret key for authenticated encryption.
     93         * @param string $run_dir    Optional owning private run directory.
     94         * @param string $run_handle Optional signed run handle.
     95         * @param bool   $strict     Fail closed on missing/tampered state during load.
     96         */
     97        public function __construct(
     98                string $file,
     99                string $secret = '',
     100                string $run_dir = '',
     101                string $run_handle = '',
     102                bool $strict = false
     103        ) {
     104                $this->file       = $file;
     105                $this->secret     = $secret;
     106                $this->run_dir    = $run_dir;
     107                $this->run_handle = $run_handle;
     108                $this->strict     = $strict;
    42109                $this->load();
    43110        }
    44111
    45112        /**
    46          * Load state from disk.
     113         * Normalize a filesystem path for cross-platform prefix comparisons.
     114         *
     115         * @param string $path Raw filesystem path.
     116         * @return string Normalized path without trailing slash (except root).
     117         */
     118        public static function normalize_path( string $path ): string {
     119                $path = trim( $path );
     120                if ( '' === $path ) {
     121                        return '';
     122                }
     123
     124                $resolved = @realpath( $path );
     125                if ( is_string( $resolved ) && '' !== $resolved ) {
     126                        $path = $resolved;
     127                }
     128
     129                $path   = str_replace( '\\', '/', $path );
     130                $prefix = '';
     131
     132                if ( preg_match( '/^([A-Za-z]:)\/(.*)$/', $path, $m ) ) {
     133                        $prefix = $m[1] . '/';
     134                        $rest   = $m[2];
     135                } elseif ( 0 === strpos( $path, '/' ) ) {
     136                        $prefix = '/';
     137                        $rest   = ltrim( $path, '/' );
     138                } else {
     139                        $rest = $path;
     140                }
     141
     142                $segments = array();
     143                foreach ( explode( '/', $rest ) as $part ) {
     144                        if ( '' === $part || '.' === $part ) {
     145                                continue;
     146                        }
     147                        if ( '..' === $part ) {
     148                                array_pop( $segments );
     149                                continue;
     150                        }
     151                        $segments[] = $part;
     152                }
     153
     154                $normalized = $prefix . implode( '/', $segments );
     155
     156                return '' === $normalized ? $prefix : $normalized;
     157        }
     158
     159        /**
     160         * Check whether a candidate directory is strictly outside the installer
     161         * working directory and the web server document root.
     162         *
     163         * @param string      $candidate_dir Candidate storage directory.
     164         * @param string      $web_dir       Installer working directory.
     165         * @param string|null $doc_root      Web server DOCUMENT_ROOT, if known.
     166         * @return bool
     167         */
     168        public static function is_outside_webroot( string $candidate_dir, string $web_dir, ?string $doc_root = null ): bool {
     169                $candidate = self::normalize_path( $candidate_dir );
     170                if ( '' === $candidate || ! is_dir( $candidate_dir ) ) {
     171                        return false;
     172                }
     173
     174                $roots = array();
     175                $web   = self::normalize_path( $web_dir );
     176                if ( '' !== $web ) {
     177                        $roots[] = $web;
     178                }
     179                if ( null !== $doc_root && '' !== trim( $doc_root ) ) {
     180                        $doc = self::normalize_path( $doc_root );
     181                        if ( '' !== $doc ) {
     182                                $roots[] = $doc;
     183                        }
     184                }
     185
     186                $case_insensitive = ( '\\' === DIRECTORY_SEPARATOR ) || ( 1 === preg_match( '/^[A-Za-z]:\//', $candidate ) );
     187                $cmp_candidate    = $case_insensitive ? strtolower( $candidate ) : $candidate;
     188
     189                foreach ( $roots as $root ) {
     190                        $cmp_root = $case_insensitive ? strtolower( $root ) : $root;
     191                        $cmp_root = rtrim( $cmp_root, '/' );
     192                        if ( '' === $cmp_root ) {
     193                                continue;
     194                        }
     195
     196                        if ( $cmp_candidate === $cmp_root || 0 === strpos( $cmp_candidate, $cmp_root . '/' ) ) {
     197                                return false;
     198                        }
     199                }
     200
     201                return true;
     202        }
     203
     204        /**
     205         * Find a writable base directory strictly outside the web document root and
     206         * installer working directory where a private `0700` directory can be created.
     207         *
     208         * @param string                  $web_dir    Installer working directory.
     209         * @param string|null             $doc_root   Web server DOCUMENT_ROOT.
     210         * @param array<int, string>|null $candidates Optional explicit candidate list (for testing).
     211         * @return string Normalized absolute path of the external base directory.
     212         *
     213         * @throws \RuntimeException If no secure external storage directory is available.
     214         */
     215        public static function find_secure_base_dir(
     216                string $web_dir,
     217                ?string $doc_root = null,
     218                ?array $candidates = null
     219        ): string {
     220                if ( null === $doc_root && isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
     221                        // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Server document root fallback during standalone restore.
     222                        $doc_root = (string) $_SERVER['DOCUMENT_ROOT'];
     223                }
     224
     225                if ( null === $candidates ) {
     226                        $candidates = self::default_candidate_dirs();
     227                }
     228
     229                $checked = array();
     230                foreach ( $candidates as $dir ) {
     231                        $dir = trim( (string) $dir );
     232                        if ( '' === $dir || is_link( $dir ) || ! is_dir( $dir ) ) {
     233                                continue;
     234                        }
     235
     236                        $normalized = self::normalize_path( $dir );
     237                        if ( '' === $normalized || isset( $checked[ $normalized ] ) ) {
     238                                continue;
     239                        }
     240                        $checked[ $normalized ] = true;
     241
     242                        if ( ! self::is_outside_webroot( $normalized, $web_dir, $doc_root ) ) {
     243                                continue;
     244                        }
     245
     246                        $probe_dir = rtrim( $normalized, '/' ) . '/.backupino-probe-' . bin2hex( random_bytes( 8 ) );
     247                        if ( ! @mkdir( $probe_dir, 0700, false ) ) {
     248                                continue;
     249                        }
     250                        @chmod( $probe_dir, 0700 );
     251                        $ok = ! is_link( $probe_dir ) && is_dir( $probe_dir ) && self::is_outside_webroot( $probe_dir, $web_dir, $doc_root );
     252                        @rmdir( $probe_dir );
     253
     254                        if ( $ok ) {
     255                                return $normalized;
     256                        }
     257                }
     258
     259                throw new \RuntimeException(
     260                        'Secure temporary storage outside the web document root is unavailable. Installation stopped to protect sensitive credentials.'
     261                );
     262        }
     263
     264        /**
     265         * Atomically create a brand-new, private `0700` run directory outside the web root
     266         * with a cryptographically random name independent of any browser-visible token.
     267         *
     268         * Rejects pre-existing directories, symlinks, invalid ownership, or unsafe permissions.
     269         *
     270         * @param string                  $web_dir      Installer working directory.
     271         * @param string                  $state_secret Independent server-only secret (>= 32 chars).
     272         * @param string                  $archive_name Archive basename for binding.
     273         * @param string|null             $doc_root     Web server DOCUMENT_ROOT.
     274         * @param array<int, string>|null $candidates   Optional explicit candidate list (for testing).
     275         * @return self
     276         *
     277         * @throws \RuntimeException If secure private storage cannot be created or verified.
     278         */
     279        public static function create_private_run(
     280                string $web_dir,
     281                string $state_secret,
     282                string $archive_name = '',
     283                ?string $doc_root = null,
     284                ?array $candidates = null
     285        ): self {
     286                if ( strlen( trim( $state_secret ) ) < 32 ) {
     287                        throw new \RuntimeException( 'Installer server-side security secret is missing or invalid.' );
     288                }
     289
     290                $base_dir = self::find_secure_base_dir( $web_dir, $doc_root, $candidates );
     291
     292                for ( $attempt = 0; $attempt < 8; ++$attempt ) {
     293                        $nonce   = bin2hex( random_bytes( 16 ) );
     294                        $run_dir = rtrim( $base_dir, '/' ) . '/' . self::RUN_DIR_PREFIX . $nonce;
     295
     296                        // Atomic creation (non-recursive) fails if directory or symlink already exists.
     297                        if ( ! @mkdir( $run_dir, 0700, false ) ) {
     298                                continue;
     299                        }
     300
     301                        @chmod( $run_dir, 0700 );
     302
     303                        try {
     304                                self::assert_private_dir_safe( $run_dir, $web_dir, $doc_root );
     305                        } catch ( \RuntimeException $e ) {
     306                                @rmdir( $run_dir );
     307                                throw $e;
     308                        }
     309
     310                        $handle     = $nonce . '.' . self::sign_run( $nonce, $web_dir, $archive_name, $state_secret );
     311                        $run_secret = self::derive_run_secret( $nonce, $web_dir, $state_secret );
     312                        $state_file = $run_dir . '/' . self::STATE_FILENAME;
     313
     314                        $state = new self( $state_file, $run_secret, $run_dir, $handle, false );
     315                        if ( ! $state->save() ) {
     316                                $state->destroy();
     317                                throw new \RuntimeException( 'Failed to initialize secure installer state.' );
     318                        }
     319
     320                        return $state;
     321                }
     322
     323                throw new \RuntimeException(
     324                        'Failed to allocate an exclusive private state directory. Installation stopped.'
     325                );
     326        }
     327
     328        /**
     329         * Open and verify an existing private run directory using its server-signed handle.
     330         *
     331         * Fails closed if the handle signature is invalid, the directory or state file is a
     332         * symlink, owned by another user, inside webroot, pre-created, missing, or tampered.
     333         *
     334         * @param string                  $run_handle   Opaque signed handle (`<32-hex>.<64-hex>`).
     335         * @param string                  $web_dir      Installer working directory.
     336         * @param string                  $state_secret Independent server-only secret.
     337         * @param string                  $archive_name Archive basename for binding.
     338         * @param string|null             $doc_root     Web server DOCUMENT_ROOT.
     339         * @param array<int, string>|null $candidates   Optional explicit candidate list (for testing).
     340         * @return self
     341         *
     342         * @throws \RuntimeException On invalid handle, unsafe path/ownership, or tampered state.
     343         */
     344        public static function open_private_run(
     345                string $run_handle,
     346                string $web_dir,
     347                string $state_secret,
     348                string $archive_name = '',
     349                ?string $doc_root = null,
     350                ?array $candidates = null
     351        ): self {
     352                if ( strlen( trim( $state_secret ) ) < 32 ) {
     353                        throw new \RuntimeException( 'Installer server-side security secret is missing or invalid.' );
     354                }
     355
     356                if ( 1 !== preg_match( '/^([a-f0-9]{32})\.([a-f0-9]{64})$/', $run_handle, $m ) ) {
     357                        throw new \RuntimeException( 'Invalid or missing installer session handle.' );
     358                }
     359
     360                $nonce        = $m[1];
     361                $provided_sig = $m[2];
     362                $expected_sig = self::sign_run( $nonce, $web_dir, $archive_name, $state_secret );
     363
     364                if ( ! hash_equals( $expected_sig, $provided_sig ) ) {
     365                        throw new \RuntimeException( 'Installer session verification failed.' );
     366                }
     367
     368                if ( null === $doc_root && isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
     369                        // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Server document root fallback during standalone restore.
     370                        $doc_root = (string) $_SERVER['DOCUMENT_ROOT'];
     371                }
     372
     373                if ( null === $candidates ) {
     374                        $candidates = self::default_candidate_dirs();
     375                }
     376
     377                $run_dir = '';
     378                $checked = array();
     379                foreach ( $candidates as $dir ) {
     380                        $dir = trim( (string) $dir );
     381                        if ( '' === $dir || is_link( $dir ) || ! is_dir( $dir ) ) {
     382                                continue;
     383                        }
     384                        $normalized = self::normalize_path( $dir );
     385                        if ( '' === $normalized || isset( $checked[ $normalized ] ) ) {
     386                                continue;
     387                        }
     388                        $checked[ $normalized ] = true;
     389
     390                        $candidate_run = rtrim( $normalized, '/' ) . '/' . self::RUN_DIR_PREFIX . $nonce;
     391                        if ( file_exists( $candidate_run ) || is_link( $candidate_run ) ) {
     392                                $run_dir = $candidate_run;
     393                                break;
     394                        }
     395                }
     396
     397                if ( '' === $run_dir ) {
     398                        throw new \RuntimeException( 'Installer session state was not found or has expired.' );
     399                }
     400
     401                self::assert_private_dir_safe( $run_dir, $web_dir, $doc_root );
     402
     403                $state_file = $run_dir . '/' . self::STATE_FILENAME;
     404                self::assert_private_file_safe( $state_file, $run_dir );
     405
     406                $run_secret = self::derive_run_secret( $nonce, $web_dir, $state_secret );
     407
     408                return new self( $state_file, $run_secret, $run_dir, $run_handle, true );
     409        }
     410
     411        /**
     412         * Load state from disk. In strict mode, any missing, malformed, unguarded, or
     413         * tampered state fails closed by throwing RuntimeException.
    47414         *
    48415         * @return void
     416         *
     417         * @throws \RuntimeException In strict mode when state cannot be verified or decrypted.
    49418         */
    50419        public function load(): void {
     420                if ( is_link( $this->file ) ) {
     421                        $this->data = array();
     422                        if ( $this->strict ) {
     423                                throw new \RuntimeException( 'Installer state file is unsafe (symlink detected).' );
     424                        }
     425
     426                        return;
     427                }
     428
    51429                if ( ! is_readable( $this->file ) ) {
    52430                        $this->data = array();
     431                        if ( $this->strict ) {
     432                                throw new \RuntimeException( 'Installer state file is missing or unreadable.' );
     433                        }
    53434
    54435                        return;
    55436                }
    56437
    57                 $raw    = (string) file_get_contents( $this->file );
     438                $raw = @file_get_contents( $this->file );
     439                if ( ! is_string( $raw ) ) {
     440                        $this->data = array();
     441                        if ( $this->strict ) {
     442                                throw new \RuntimeException( 'Installer state file could not be read.' );
     443                        }
     444
     445                        return;
     446                }
     447
     448                if ( 0 !== strpos( $raw, self::GUARD_PREFIX ) ) {
     449                        $this->data = array();
     450                        if ( $this->strict ) {
     451                                throw new \RuntimeException( 'Installer state integrity check failed.' );
     452                        }
     453                } else {
     454                        $raw = substr( $raw, strlen( self::GUARD_PREFIX ) );
     455                }
     456
    58457                $parsed = json_decode( $raw, true );
    59 
    60                 $this->data = is_array( $parsed ) ? $parsed : array();
    61         }
    62 
    63         /**
    64          * Persist state atomically with restrictive permissions.
     458                if ( ! is_array( $parsed ) ) {
     459                        $this->data = array();
     460                        if ( $this->strict ) {
     461                                throw new \RuntimeException( 'Installer state is corrupted or tampered.' );
     462                        }
     463
     464                        return;
     465                }
     466
     467                if ( '' !== $this->secret ) {
     468                        $decrypted = $this->decrypt_envelope( $parsed );
     469                        if ( ! is_array( $decrypted ) ) {
     470                                $this->data = array();
     471                                if ( $this->strict ) {
     472                                        throw new \RuntimeException( 'Installer state decryption or authentication failed.' );
     473                                }
     474
     475                                return;
     476                        }
     477                        $this->data = $decrypted;
     478
     479                        return;
     480                }
     481
     482                $this->data = $parsed;
     483        }
     484
     485        /**
     486         * Persist state atomically with PHP guard, server-secret authenticated encryption,
     487         * and restrictive 0600 permissions inside the private run directory.
    65488         *
    66489         * @return bool
    67490         */
    68491        public function save(): bool {
    69                 $encoded = json_encode( $this->data );
    70 
    71                 if ( ! is_string( $encoded ) ) {
     492                if ( is_link( $this->file ) ) {
    72493                        return false;
    73494                }
    74495
    75                 $temp = $this->file . '.tmp';
    76 
    77                 if ( false === @file_put_contents( $temp, $encoded, LOCK_EX ) ) {
     496                if ( '' !== $this->run_dir && ( is_link( $this->run_dir ) || ! is_dir( $this->run_dir ) ) ) {
    78497                        return false;
    79498                }
    80499
     500                $plaintext = json_encode( $this->data );
     501                if ( ! is_string( $plaintext ) ) {
     502                        return false;
     503                }
     504
     505                if ( '' !== $this->secret ) {
     506                        $envelope = $this->encrypt_envelope( $plaintext );
     507                        $encoded  = json_encode( $envelope );
     508                        if ( ! is_string( $encoded ) ) {
     509                                return false;
     510                        }
     511                } else {
     512                        $encoded = $plaintext;
     513                }
     514
     515                $payload = self::GUARD_PREFIX . $encoded;
     516                $temp    = $this->file . '.tmp.' . bin2hex( random_bytes( 6 ) );
     517
     518                $fp = @fopen( $temp, 'xb' );
     519                if ( false === $fp ) {
     520                        return false;
     521                }
     522
    81523                @chmod( $temp, 0600 );
    82 
    83                 return @rename( $temp, $this->file );
     524                $written = @fwrite( $fp, $payload );
     525                @fflush( $fp );
     526                @fclose( $fp );
     527
     528                if ( false === $written || $written !== strlen( $payload ) ) {
     529                        @unlink( $temp );
     530
     531                        return false;
     532                }
     533
     534                if ( ! @rename( $temp, $this->file ) ) {
     535                        @unlink( $temp );
     536
     537                        return false;
     538                }
     539
     540                @chmod( $this->file, 0600 );
     541
     542                return true;
     543        }
     544
     545        /**
     546         * Absolute path of the state file.
     547         *
     548         * @return string
     549         */
     550        public function file(): string {
     551                return $this->file;
     552        }
     553
     554        /**
     555         * Absolute path of the private per-run directory.
     556         *
     557         * @return string
     558         */
     559        public function run_dir(): string {
     560                return $this->run_dir;
     561        }
     562
     563        /**
     564         * Opaque signed handle referencing this private run.
     565         *
     566         * @return string
     567         */
     568        public function handle(): string {
     569                return $this->run_handle;
    84570        }
    85571
    … …  
    87573         * Read a value.
    88574         *
    89          * @param string $key     Key.
     575         * @param string $key      Key.
    90576         * @param mixed  $fallback Fallback.
    91577         * @return mixed
    … …  
    107593
    108594        /**
     595         * Remove a single key from state.
     596         *
     597         * @param string $key Key.
     598         * @return void
     599         */
     600        public function remove( string $key ): void {
     601                unset( $this->data[ $key ] );
     602        }
     603
     604        /**
    109605         * Whether a key exists.
    110606         *
    … …  
    117613
    118614        /**
    119          * Delete the state file.
     615         * Purge sensitive credential keys from state immediately.
     616         *
     617         * When `$keep_auth_flag` is true and the session was authenticated with an
     618         * installer password, only the minimal non-sensitive authentication flag is
     619         * retained so the final cleanup step can still be authorized. Otherwise the
     620         * entire private run state and directory are destroyed immediately.
     621         *
     622         * @param bool $keep_auth_flag Whether to preserve minimal non-sensitive auth status.
     623         * @return void
     624         */
     625        public function purge_sensitive( bool $keep_auth_flag = false ): void {
     626                unset( $this->data['db'], $this->data['admin_account'] );
     627
     628                if ( $keep_auth_flag && ! empty( $this->data['authenticated'] ) ) {
     629                        $this->data = array(
     630                                'authenticated' => true,
     631                                'finished'      => ! empty( $this->data['finished'] ),
     632                        );
     633                        $this->cleanup_crash_temps();
     634                        $this->save();
     635
     636                        return;
     637                }
     638
     639                $this->destroy();
     640        }
     641
     642        /**
     643         * Delete the state file, any crash-leftover `.tmp.*` files strictly inside this
     644         * run's private directory, and remove the private directory itself.
     645         *
     646         * Never touches files belonging to other runs, shared temp files, or user files.
    120647         *
    121648         * @return void
    … …  
    124651                $this->data = array();
    125652
     653                if ( '' !== $this->run_dir && is_dir( $this->run_dir ) && ! is_link( $this->run_dir ) ) {
     654                        $this->cleanup_crash_temps();
     655
     656                        if ( is_file( $this->file ) || is_link( $this->file ) ) {
     657                                @chmod( $this->file, 0600 );
     658                                @unlink( $this->file );
     659                        }
     660
     661                        @rmdir( $this->run_dir );
     662
     663                        return;
     664                }
     665
    126666                if ( is_file( $this->file ) ) {
     667                        @chmod( $this->file, 0600 );
    127668                        @unlink( $this->file );
     669                }
     670
     671                if ( is_file( $this->file . '.tmp' ) ) {
     672                        @unlink( $this->file . '.tmp' );
     673                }
     674        }
     675
     676        /**
     677         * Remove any crash-leftover temporary files (`state.php.tmp*`) strictly scoped
     678         * to this run's private directory.
     679         *
     680         * @return void
     681         */
     682        public function cleanup_crash_temps(): void {
     683                if ( '' === $this->run_dir || ! is_dir( $this->run_dir ) || is_link( $this->run_dir ) ) {
     684                        return;
     685                }
     686
     687                $entries = @scandir( $this->run_dir );
     688                if ( ! is_array( $entries ) ) {
     689                        return;
     690                }
     691
     692                $prefix = self::STATE_FILENAME . '.tmp';
     693                foreach ( $entries as $entry ) {
     694                        if ( '.' === $entry || '..' === $entry ) {
     695                                continue;
     696                        }
     697                        if ( $entry === $prefix || 1 === preg_match( '/^' . preg_quote( $prefix, '/' ) . '\.[a-f0-9]+$/i', $entry ) ) {
     698                                $path = rtrim( $this->run_dir, '/' ) . '/' . $entry;
     699                                if ( is_file( $path ) || is_link( $path ) ) {
     700                                        @chmod( $path, 0600 );
     701                                        @unlink( $path );
     702                                }
     703                        }
    128704                }
    129705        }
    … …  
    137713                return $this->data;
    138714        }
     715
     716        /**
     717         * Default external candidate directories outside webroot.
     718         *
     719         * @return array<int, string>
     720         */
     721        private static function default_candidate_dirs(): array {
     722                $candidates = array();
     723
     724                $sys_tmp = sys_get_temp_dir();
     725                if ( is_string( $sys_tmp ) && '' !== trim( $sys_tmp ) ) {
     726                        $candidates[] = $sys_tmp;
     727                }
     728
     729                $upload_tmp = (string) ini_get( 'upload_tmp_dir' );
     730                if ( '' !== trim( $upload_tmp ) ) {
     731                        $candidates[] = $upload_tmp;
     732                }
     733
     734                if ( function_exists( 'session_save_path' ) ) {
     735                        $sess_dir = (string) session_save_path();
     736                        if ( '' !== trim( $sess_dir ) ) {
     737                                if ( false !== strpos( $sess_dir, ';' ) ) {
     738                                        $parts    = explode( ';', $sess_dir );
     739                                        $sess_dir = (string) end( $parts );
     740                                }
     741                                if ( '' !== trim( $sess_dir ) ) {
     742                                        $candidates[] = $sess_dir;
     743                                }
     744                        }
     745                }
     746
     747                return $candidates;
     748        }
     749
     750        /**
     751         * Verify that a private run directory is real, not a symlink, outside webroot,
     752         * owned by the current OS user, and has no group/world access on POSIX systems.
     753         *
     754         * @param string      $dir      Candidate private run directory.
     755         * @param string      $web_dir  Installer working directory.
     756         * @param string|null $doc_root Web server DOCUMENT_ROOT.
     757         * @return void
     758         *
     759         * @throws \RuntimeException If any safety invariant fails.
     760         */
     761        private static function assert_private_dir_safe( string $dir, string $web_dir, ?string $doc_root ): void {
     762                if ( is_link( $dir ) || ! is_dir( $dir ) ) {
     763                        throw new \RuntimeException( 'Secure private state directory is missing or unsafe.' );
     764                }
     765
     766                if ( ! self::is_outside_webroot( $dir, $web_dir, $doc_root ) ) {
     767                        throw new \RuntimeException( 'State directory resolved inside web document root. Installation stopped.' );
     768                }
     769
     770                if ( '\\' !== DIRECTORY_SEPARATOR ) {
     771                        clearstatcache( true, $dir );
     772                        if ( function_exists( 'posix_geteuid' ) && function_exists( 'fileowner' ) ) {
     773                                $owner = @fileowner( $dir );
     774                                if ( false === $owner || $owner !== posix_geteuid() ) {
     775                                        throw new \RuntimeException( 'Private state directory ownership verification failed.' );
     776                                }
     777                        }
     778
     779                        $perms = @fileperms( $dir );
     780                        if ( false !== $perms && 0 !== ( $perms & 0077 ) ) {
     781                                throw new \RuntimeException( 'Private state directory permissions are too permissive.' );
     782                        }
     783                }
     784        }
     785
     786        /**
     787         * Verify that the state file inside a private run directory is a regular file
     788         * (not a symlink), lives inside the private directory, and has safe ownership/perms.
     789         *
     790         * @param string $file    Absolute state file path.
     791         * @param string $run_dir Expected parent private run directory.
     792         * @return void
     793         *
     794         * @throws \RuntimeException If any safety invariant fails.
     795         */
     796        private static function assert_private_file_safe( string $file, string $run_dir ): void {
     797                if ( is_link( $file ) || ! is_file( $file ) ) {
     798                        throw new \RuntimeException( 'Installer state file is missing or unsafe.' );
     799                }
     800
     801                $norm_dir  = rtrim( self::normalize_path( $run_dir ), '/' );
     802                $norm_file = self::normalize_path( $file );
     803                if ( 0 !== strpos( $norm_file, $norm_dir . '/' ) ) {
     804                        throw new \RuntimeException( 'Installer state file path escaped its private directory.' );
     805                }
     806
     807                if ( '\\' !== DIRECTORY_SEPARATOR ) {
     808                        clearstatcache( true, $file );
     809                        if ( function_exists( 'posix_geteuid' ) && function_exists( 'fileowner' ) ) {
     810                                $owner = @fileowner( $file );
     811                                if ( false === $owner || $owner !== posix_geteuid() ) {
     812                                        throw new \RuntimeException( 'Installer state file ownership verification failed.' );
     813                                }
     814                        }
     815
     816                        $perms = @fileperms( $file );
     817                        if ( false !== $perms && 0 !== ( $perms & 0077 ) ) {
     818                                throw new \RuntimeException( 'Installer state file permissions are too permissive.' );
     819                        }
     820                }
     821        }
     822
     823        /**
     824         * Compute the server-signed HMAC binding a run nonce to this installer instance.
     825         *
     826         * @param string $nonce        32-char hex nonce.
     827         * @param string $web_dir      Installer working directory.
     828         * @param string $archive_name Archive basename.
     829         * @param string $state_secret Server-only secret.
     830         * @return string 64-char hex HMAC-SHA256.
     831         */
     832        private static function sign_run( string $nonce, string $web_dir, string $archive_name, string $state_secret ): string {
     833                return hash_hmac(
     834                        'sha256',
     835                        'backupino-run-handle|' . $nonce . '|' . self::normalize_path( $web_dir ) . '|' . basename( $archive_name ),
     836                        $state_secret
     837                );
     838        }
     839
     840        /**
     841         * Derive the per-run encryption secret from the server-only secret and run nonce.
     842         *
     843         * @param string $nonce        32-char hex nonce.
     844         * @param string $web_dir      Installer working directory.
     845         * @param string $state_secret Server-only secret.
     846         * @return string
     847         */
     848        private static function derive_run_secret( string $nonce, string $web_dir, string $state_secret ): string {
     849                return hash_hmac(
     850                        'sha256',
     851                        'backupino-run-secret|' . $nonce . '|' . self::normalize_path( $web_dir ),
     852                        $state_secret
     853                );
     854        }
     855
     856        /**
     857         * Encrypt a JSON string into an authenticated envelope.
     858         *
     859         * @param string $plaintext JSON payload.
     860         * @return array<string, mixed>
     861         */
     862        private function encrypt_envelope( string $plaintext ): array {
     863                $enc_key = hash_hmac( 'sha256', 'backupino-state-enc', $this->secret, true );
     864                $mac_key = hash_hmac( 'sha256', 'backupino-state-mac', $this->secret, true );
     865
     866                if ( function_exists( 'openssl_encrypt' ) && function_exists( 'openssl_get_cipher_methods' ) ) {
     867                        $methods = openssl_get_cipher_methods();
     868
     869                        if ( in_array( 'aes-256-gcm', $methods, true ) ) {
     870                                $iv  = random_bytes( 12 );
     871                                $tag = '';
     872                                $ct  = openssl_encrypt( $plaintext, 'aes-256-gcm', $enc_key, OPENSSL_RAW_DATA, $iv, $tag );
     873                                if ( is_string( $ct ) && '' !== $tag ) {
     874                                        return array(
     875                                                'v'   => 2,
     876                                                'alg' => 'aes-256-gcm',
     877                                                'iv'  => base64_encode( $iv ),
     878                                                'tag' => base64_encode( $tag ),
     879                                                'ct'  => base64_encode( $ct ),
     880                                        );
     881                                }
     882                        }
     883
     884                        if ( in_array( 'aes-256-cbc', $methods, true ) ) {
     885                                $iv = random_bytes( 16 );
     886                                $ct = openssl_encrypt( $plaintext, 'aes-256-cbc', $enc_key, OPENSSL_RAW_DATA, $iv );
     887                                if ( is_string( $ct ) ) {
     888                                        $mac = hash_hmac( 'sha256', $iv . $ct, $mac_key, true );
     889
     890                                        return array(
     891                                                'v'   => 2,
     892                                                'alg' => 'aes-256-cbc-hmac',
     893                                                'iv'  => base64_encode( $iv ),
     894                                                'mac' => base64_encode( $mac ),
     895                                                'ct'  => base64_encode( $ct ),
     896                                        );
     897                                }
     898                        }
     899                }
     900
     901                // OpenSSL fallback: authenticated stream cipher (still inside 0700 private dir outside webroot + PHP 403 guard).
     902                $salt = random_bytes( 16 );
     903                $ct   = self::xor_stream( $plaintext, $enc_key, $salt );
     904                $mac  = hash_hmac( 'sha256', $salt . $ct, $mac_key, true );
     905
     906                return array(
     907                        'v'    => 2,
     908                        'alg'  => 'hmac-stream',
     909                        'salt' => base64_encode( $salt ),
     910                        'mac'  => base64_encode( $mac ),
     911                        'ct'   => base64_encode( $ct ),
     912                );
     913        }
     914
     915        /**
     916         * Decrypt and authenticate a persisted state envelope.
     917         *
     918         * @param array<string, mixed> $envelope Decoded envelope.
     919         * @return array<string, mixed>|null
     920         */
     921        private function decrypt_envelope( array $envelope ): ?array {
     922                if ( 2 !== (int) ( $envelope['v'] ?? 0 ) || empty( $envelope['alg'] ) || empty( $envelope['ct'] ) ) {
     923                        return null;
     924                }
     925
     926                $enc_key   = hash_hmac( 'sha256', 'backupino-state-enc', $this->secret, true );
     927                $mac_key   = hash_hmac( 'sha256', 'backupino-state-mac', $this->secret, true );
     928                $alg       = (string) $envelope['alg'];
     929                $ct        = base64_decode( (string) $envelope['ct'], true );
     930                $plaintext = false;
     931
     932                if ( ! is_string( $ct ) ) {
     933                        return null;
     934                }
     935
     936                if ( 'aes-256-gcm' === $alg && function_exists( 'openssl_decrypt' ) ) {
     937                        $iv  = base64_decode( (string) ( $envelope['iv'] ?? '' ), true );
     938                        $tag = base64_decode( (string) ( $envelope['tag'] ?? '' ), true );
     939                        if ( is_string( $iv ) && is_string( $tag ) ) {
     940                                $plaintext = openssl_decrypt( $ct, 'aes-256-gcm', $enc_key, OPENSSL_RAW_DATA, $iv, $tag );
     941                        }
     942                } elseif ( 'aes-256-cbc-hmac' === $alg && function_exists( 'openssl_decrypt' ) ) {
     943                        $iv  = base64_decode( (string) ( $envelope['iv'] ?? '' ), true );
     944                        $mac = base64_decode( (string) ( $envelope['mac'] ?? '' ), true );
     945                        if ( is_string( $iv ) && is_string( $mac ) ) {
     946                                $expected = hash_hmac( 'sha256', $iv . $ct, $mac_key, true );
     947                                if ( hash_equals( $expected, $mac ) ) {
     948                                        $plaintext = openssl_decrypt( $ct, 'aes-256-cbc', $enc_key, OPENSSL_RAW_DATA, $iv );
     949                                }
     950                        }
     951                } elseif ( 'hmac-stream' === $alg ) {
     952                        $salt = base64_decode( (string) ( $envelope['salt'] ?? '' ), true );
     953                        $mac  = base64_decode( (string) ( $envelope['mac'] ?? '' ), true );
     954                        if ( is_string( $salt ) && is_string( $mac ) ) {
     955                                $expected = hash_hmac( 'sha256', $salt . $ct, $mac_key, true );
     956                                if ( hash_equals( $expected, $mac ) ) {
     957                                        $plaintext = self::xor_stream( $ct, $enc_key, $salt );
     958                                }
     959                        }
     960                }
     961
     962                if ( ! is_string( $plaintext ) ) {
     963                        return null;
     964                }
     965
     966                $decoded = json_decode( $plaintext, true );
     967
     968                return is_array( $decoded ) ? $decoded : null;
     969        }
     970
     971        /**
     972         * Deterministic HMAC-SHA256 counter-mode XOR stream for environments without OpenSSL.
     973         *
     974         * @param string $input Data to encrypt or decrypt.
     975         * @param string $key   32-byte key.
     976         * @param string $salt  16-byte nonce/salt.
     977         * @return string
     978         */
     979        private static function xor_stream( string $input, string $key, string $salt ): string {
     980                $len     = strlen( $input );
     981                $out     = '';
     982                $counter = 0;
     983
     984                for ( $offset = 0; $offset < $len; $offset += 32 ) {
     985                        $block   = hash_hmac( 'sha256', $salt . pack( 'N', $counter ), $key, true );
     986                        $chunk   = substr( $input, $offset, 32 );
     987                        $out    .= $chunk ^ substr( $block, 0, strlen( $chunk ) );
     988                        ++$counter;
     989                }
     990
     991                return $out;
     992        }
    139993}
  • backupino/tags/1.1.0/src/Installer/installer-template.php

    r3800274 r3809656  
    3434        $error = error_get_last();
    3535        if ( $error && in_array( $error['type'], array( E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR ), true ) ) {
     36                if ( isset( $GLOBALS['backupino_active_state'] ) && $GLOBALS['backupino_active_state'] instanceof State ) {
     37                        $GLOBALS['backupino_active_state']->purge_sensitive( false );
     38                }
    3639                while ( ob_get_level() > 0 ) {
    3740                        @ob_end_clean();
    … …  
    4346                echo json_encode( array(
    4447                        'ok'    => false,
    45                         'error' => 'Fatal Error: ' . $error['message'] . ' in ' . basename( $error['file'] ) . ':' . $error['line'],
     48                        'error' => 'A fatal server error occurred during installation. Temporary credentials have been cleared.',
    4649                ), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE );
    4750                exit;
    … …  
    9598}
    9699
    97 $backupino_state_file   = $backupino_dir . '/backupino-install.json';
    98100$backupino_archive_name = isset( $backupino_payload['archive'] ) ? basename( (string) $backupino_payload['archive'] ) : '';
    99101$backupino_archive      = $backupino_dir . '/' . $backupino_archive_name;
    100102$backupino_token        = isset( $backupino_payload['token'] ) ? (string) $backupino_payload['token'] : '';
     103$backupino_state_secret = isset( $backupino_payload['state_secret'] ) ? (string) $backupino_payload['state_secret'] : '';
    101104$backupino_action       = isset( $_REQUEST['action'] ) ? (string) preg_replace( '/[^a-z_]/', '', (string) $_REQUEST['action'] ) : 'index';
     105$backupino_doc_root     = isset( $_SERVER['DOCUMENT_ROOT'] ) ? (string) $_SERVER['DOCUMENT_ROOT'] : null;
     106
     107$backupino_state_base  = '';
     108$backupino_state_error = '';
     109if ( strlen( trim( $backupino_state_secret ) ) < 32 || ( '' !== $backupino_token && hash_equals( $backupino_token, $backupino_state_secret ) ) ) {
     110        $backupino_state_error = 'Installer server-side security secret is missing or invalid.';
     111} else {
     112        try {
     113                $backupino_state_base = State::find_secure_base_dir( $backupino_dir, $backupino_doc_root );
     114        } catch ( \RuntimeException $e ) {
     115                $backupino_state_error = $e->getMessage();
     116        }
     117}
    102118
    103119// Auto-detect current host and base URL
    … …  
    111127
    112128if ( 'index' === $backupino_action ) {
    113         $backupino_checks = Env::check( $backupino_payload, $backupino_dir, $backupino_archive );
     129        $backupino_checks   = Env::check( $backupino_payload, $backupino_dir, $backupino_archive );
     130        $backupino_checks[] = array(
     131                'label'  => 'Secure state storage',
     132                'ok'     => '' === $backupino_state_error && '' !== $backupino_state_base,
     133                'detail' => '' === $backupino_state_error
     134                        ? 'Private per-run storage outside web document root'
     135                        : $backupino_state_error,
     136        );
    114137        $backupino_body   = '<div id="app">
    115138        <section id="step1">
    … …  
    142165                                <span data-i18n="empty_db_lbl">Empty existing database tables before import (Recommended)</span>
    143166                        </label>
     167                        <div class="admin-box">
     168                                <label style="display:flex;align-items:center;gap:8px;margin:0;font-weight:600;cursor:pointer;">
     169                                        <input type="checkbox" id="create_admin" name="create_admin" value="1" style="width:auto;margin:0;">
     170                                        <span data-i18n="create_admin_opt">Create a new WordPress Administrator account (Optional)</span>
     171                                </label>
     172                                <div id="admin-fields" class="hidden" style="margin-top:12px;">
     173                                        <div class="grid">
     174                                                <div>
     175                                                        <label for="admin_user" data-i18n="admin_user_lbl">Administrator Username</label>
     176                                                        <input id="admin_user" name="admin_user" placeholder="admin">
     177                                                </div>
     178                                                <div>
     179                                                        <label for="admin_email" data-i18n="admin_email_lbl">Administrator Email</label>
     180                                                        <input id="admin_email" name="admin_email" type="email" placeholder="admin@example.com">
     181                                                </div>
     182                                        </div>
     183                                        <label for="admin_pass" data-i18n="admin_pass_lbl">Administrator Password</label>
     184                                        <div class="pass-wrap">
     185                                                <input id="admin_pass" name="admin_pass" type="password" placeholder="Enter secure password">
     186                                                <button type="button" class="pass-toggle-btn" id="toggle_admin_pass" data-i18n="show_btn">Show</button>
     187                                        </div>
     188                                </div>
     189                        </div>
    144190                        <p class="err" id="error2"></p>
    145191                        <div style="display:flex;gap:10px;align-items:center;margin-top:16px;">
    … …  
    164210                <h2 style="font-size:16px;margin:0 0 10px;color:#16a34a;" id="done-title" data-i18n="ready_title">&#10003; Your site is ready</h2>
    165211                <p class="lead" id="done-url" style="font-weight:600;word-break:break-all;"></p>
     212                <div id="admin-created-box" class="hidden" style="margin:14px 0;padding:12px 14px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;font-size:13px;color:#166534;">
     213                        <div style="font-weight:700;margin-bottom:4px;" data-i18n="admin_created_title">&#10003; New Administrator Account Created:</div>
     214                        <div><span data-i18n="admin_user_lbl">Username</span>: <strong id="admin-created-name"></strong></div>
     215                </div>
    166216                <div style="display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:16px;">
    167217                        <button type="button" id="cleanup" data-i18n="cleanup_btn" style="background:#16a34a;margin-top:0;">Delete installer files &amp; Login</button>
    … …  
    197247@set_time_limit( 180 );
    198248
    199 $backupino_state = new State( $backupino_state_file );
    200 
    201 // Optional password gate, configured when the package was built.
    202 $backupino_password = isset( $backupino_payload['password'] ) ? (string) $backupino_payload['password'] : '';
    203 
    204 if ( '' !== $backupino_password && ! $backupino_state->get( 'authenticated' ) ) {
    205         $backupino_supplied = isset( $_REQUEST['installer_password'] ) ? (string) $_REQUEST['installer_password'] : '';
    206 
    207         if ( ! hash_equals( $backupino_password, $backupino_supplied ) ) {
     249if ( '' !== $backupino_state_error || '' === $backupino_state_base ) {
     250        respond(
     251                array(
     252                        'ok'    => false,
     253                        'error' => '' !== $backupino_state_error
     254                                ? $backupino_state_error
     255                                : 'Secure temporary storage outside the web document root is unavailable. Installation stopped to protect sensitive credentials.',
     256                ),
     257                500
     258        );
     259}
     260
     261$backupino_password   = isset( $backupino_payload['password'] ) ? (string) $backupino_payload['password'] : '';
     262$backupino_run_handle = isset( $_POST['run_handle'] ) ? trim( (string) $_POST['run_handle'] ) : '';
     263if ( '' === $backupino_run_handle && isset( $_COOKIE['backupino_run'] ) ) {
     264        $backupino_run_handle = trim( (string) $_COOKIE['backupino_run'] );
     265}
     266
     267$backupino_state      = null;
     268$backupino_state_file = '';
     269
     270// Actions that require an already-created private run session fail closed on invalid/tampered state.
     271if ( in_array( $backupino_action, array( 'extract', 'import', 'rewrite', 'config' ), true ) ) {
     272        try {
     273                $backupino_state = State::open_private_run(
     274                        $backupino_run_handle,
     275                        $backupino_dir,
     276                        $backupino_state_secret,
     277                        $backupino_archive_name,
     278                        $backupino_doc_root
     279                );
     280        } catch ( \RuntimeException $e ) {
     281                respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), array(), '', $backupino_state_secret, $backupino_run_handle ) ), 400 );
     282        }
     283
     284        $backupino_state_file             = $backupino_state->file();
     285        $GLOBALS['backupino_active_state'] = $backupino_state;
     286
     287        if ( '' !== $backupino_password && ! $backupino_state->get( 'authenticated' ) ) {
    208288                respond( array( 'ok' => false, 'error' => 'Installer password required.' ), 401 );
    209289        }
    210 
    211         $backupino_state->set( 'authenticated', true );
    212         $backupino_state->save();
     290} elseif ( in_array( $backupino_action, array( 'abort', 'cleanup' ), true ) && '' !== $backupino_run_handle ) {
     291        try {
     292                $backupino_state                  = State::open_private_run(
     293                        $backupino_run_handle,
     294                        $backupino_dir,
     295                        $backupino_state_secret,
     296                        $backupino_archive_name,
     297                        $backupino_doc_root
     298                );
     299                $backupino_state_file             = $backupino_state->file();
     300                $GLOBALS['backupino_active_state'] = $backupino_state;
     301        } catch ( \RuntimeException $e ) {
     302                $backupino_state = null;
     303        }
    213304}
    214305
    … …  
    216307switch ( $backupino_action ) {
    217308        case 'check':
    218                 $checks = Env::check( $backupino_payload, $backupino_dir, $backupino_archive );
     309                $checks   = Env::check( $backupino_payload, $backupino_dir, $backupino_archive );
     310                $checks[] = array(
     311                        'label'  => 'Secure state storage',
     312                        'ok'     => '' === $backupino_state_error && '' !== $backupino_state_base,
     313                        'detail' => '' === $backupino_state_error
     314                                ? 'Private per-run storage outside web document root'
     315                                : $backupino_state_error,
     316                );
    219317
    220318                respond(
    … …  
    228326
    229327        case 'connect':
     328                if ( '' !== $backupino_password ) {
     329                        $backupino_supplied = isset( $_REQUEST['installer_password'] ) ? (string) $_REQUEST['installer_password'] : '';
     330                        if ( ! hash_equals( $backupino_password, $backupino_supplied ) ) {
     331                                respond( array( 'ok' => false, 'error' => 'Installer password required.' ), 401 );
     332                        }
     333                }
     334
    230335                $prefix = isset( $_POST['prefix'] ) && '' !== trim( (string) $_POST['prefix'] ) ? trim( (string) $_POST['prefix'] ) : 'wp_';
    231336                if ( ! preg_match( '/^[a-zA-Z0-9_]+$/', $prefix ) ) {
    … …  
    253358                }
    254359
     360                $create_admin  = ! empty( $_POST['create_admin'] );
     361                $admin_account = array();
     362                if ( $create_admin ) {
     363                        $admin_user  = isset( $_POST['admin_user'] ) ? trim( (string) $_POST['admin_user'] ) : '';
     364                        $admin_pass  = isset( $_POST['admin_pass'] ) ? (string) $_POST['admin_pass'] : '';
     365                        $admin_email = isset( $_POST['admin_email'] ) ? trim( (string) $_POST['admin_email'] ) : '';
     366
     367                        if ( '' === $admin_user || strlen( $admin_user ) > 60 ) {
     368                                respond( array( 'ok' => false, 'error' => 'Administrator username is required (max 60 characters).' ), 400 );
     369                        }
     370                        if ( '' === $admin_pass ) {
     371                                respond( array( 'ok' => false, 'error' => 'Administrator password is required.' ), 400 );
     372                        }
     373                        if ( '' === $admin_email || strlen( $admin_email ) > 100 || false === filter_var( $admin_email, FILTER_VALIDATE_EMAIL ) ) {
     374                                respond( array( 'ok' => false, 'error' => 'A valid administrator email address is required.' ), 400 );
     375                        }
     376
     377                        // Hash immediately so plaintext administrator password is never stored in state.
     378                        $admin_pass_hash = AdminCreator::hash_password( $admin_pass );
     379                        unset( $admin_pass );
     380
     381                        $admin_account = array(
     382                                'enabled'       => true,
     383                                'username'      => $admin_user,
     384                                'password_hash' => $admin_pass_hash,
     385                                'email'         => $admin_email,
     386                        );
     387                }
     388
    255389                try {
    256390                        $connection = ConnectionManager::ensure( $config );
    257391                } catch ( \RuntimeException $e ) {
    258                         respond( array( 'ok' => false, 'error' => $e->getMessage() ), 400 );
     392                        respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), $config, '', $backupino_state_secret, $backupino_run_handle ) ), 400 );
    259393                }
    260394
    … …  
    269403                }
    270404
     405                // Clean up any previous run handle from the same client before creating a fresh private run.
     406                if ( '' !== $backupino_run_handle ) {
     407                        try {
     408                                $prev_state = State::open_private_run(
     409                                        $backupino_run_handle,
     410                                        $backupino_dir,
     411                                        $backupino_state_secret,
     412                                        $backupino_archive_name,
     413                                        $backupino_doc_root
     414                                );
     415                                $prev_state->destroy();
     416                        } catch ( \RuntimeException $e ) {
     417                                // Ignore stale handle.
     418                        }
     419                }
     420
     421                try {
     422                        $backupino_state = State::create_private_run(
     423                                $backupino_dir,
     424                                $backupino_state_secret,
     425                                $backupino_archive_name,
     426                                $backupino_doc_root
     427                        );
     428                } catch ( \RuntimeException $e ) {
     429                        respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), $config, '', $backupino_state_secret ) ), 500 );
     430                }
     431
     432                $backupino_state_file              = $backupino_state->file();
     433                $backupino_run_handle              = $backupino_state->handle();
     434                $GLOBALS['backupino_active_state'] = $backupino_state;
     435
     436                if ( '' !== $backupino_password ) {
     437                        $backupino_state->set( 'authenticated', true );
     438                }
    271439                $backupino_state->set( 'db', $config );
    272440                $backupino_state->set( 'tables_found', count( $tables ) );
    273441                $backupino_state->set( 'new_url', $new_url );
    274442                $backupino_state->set( 'empty_db', ! empty( $_POST['empty_db'] ) );
    275                 $backupino_state->save();
     443                $backupino_state->set( 'admin_account', $admin_account );
     444                if ( ! $backupino_state->save() ) {
     445                        $backupino_state->destroy();
     446                        respond( array( 'ok' => false, 'error' => 'Failed to persist secure installer state.' ), 500 );
     447                }
     448
     449                if ( ! headers_sent() ) {
     450                        @setcookie(
     451                                'backupino_run',
     452                                $backupino_run_handle,
     453                                array(
     454                                        'expires'  => 0,
     455                                        'path'     => '' !== $backupino_subpath ? $backupino_subpath . '/' : '/',
     456                                        'secure'   => 'https' === $backupino_scheme,
     457                                        'httponly' => true,
     458                                        'samesite' => 'Strict',
     459                                )
     460                        );
     461                }
    276462
    277463                respond(
    … …  
    279465                                'ok'           => true,
    280466                                'db'           => $config['name'],
     467                                'run_handle'   => $backupino_run_handle,
    281468                                'message'      => sprintf( 'Database connected (%d tables existing).', count( $tables ) ),
    282469                                'tables_found' => count( $tables ),
    … …  
    287474        case 'extract':
    288475                if ( ! is_readable( $backupino_archive ) ) {
     476                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
    289477                        respond( array( 'ok' => false, 'error' => 'Archive file not found: ' . basename( $backupino_archive ) ), 400 );
    290478                }
    … …  
    292480                $extractor = new Extractor( $backupino_archive, $backupino_dir );
    293481                if ( ! $extractor->open() ) {
     482                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
    294483                        respond( array( 'ok' => false, 'error' => $extractor->error() ), 400 );
    295484                }
    … …  
    300489
    301490                $backupino_state->set( 'extract_offset', $offset );
    302                 $backupino_state->save();
     491                if ( ! $backupino_state->save() ) {
     492                        $extractor->close();
     493                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     494                        respond( array( 'ok' => false, 'error' => 'Failed to persist secure installer state.' ), 500 );
     495                }
    303496
    304497                $extractor->close();
    … …  
    354547                        $connection->query( 'SET UNIQUE_CHECKS = 0' );
    355548                } catch ( \RuntimeException $e ) {
    356                         respond( array( 'ok' => false, 'error' => $e->getMessage() ), 400 );
     549                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     550                        respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), $db, $backupino_state_file, $backupino_state_secret, $backupino_run_handle ) ), 400 );
    357551                }
    358552
    … …  
    390584
    391585                if ( ! empty( $result['error'] ) ) {
    392                         respond( array( 'ok' => false, 'error' => $result['error'] ), 500 );
     586                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     587                        respond( array( 'ok' => false, 'error' => sanitize_error_message( (string) $result['error'], $db, $backupino_state_file, $backupino_state_secret, $backupino_run_handle ) ), 500 );
    393588                }
    394589
    … …  
    453648                        $connection->query( 'SET UNIQUE_CHECKS = 0' );
    454649                } catch ( \RuntimeException $e ) {
    455                         respond( array( 'ok' => false, 'error' => $e->getMessage() ), 400 );
     650                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     651                        respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), $db, $backupino_state_file, $backupino_state_secret, $backupino_run_handle ) ), 400 );
    456652                }
    457653
    … …  
    476672
    477673        case 'config':
    478                 $db = $backupino_state->get( 'db' );
     674                $admin_created_username = '';
     675                $db                     = $backupino_state->get( 'db' );
    479676
    480677                if ( ! is_array( $db ) ) {
    … …  
    752949                                // Table might not exist yet, ignore.
    753950                        }
     951
     952                        // 5. Optional new WordPress Administrator account creation (INSERT-only; never modifies existing accounts)
     953                        $admin_account = (array) $backupino_state->get( 'admin_account' );
     954                        if ( ! empty( $admin_account['enabled'] ) && ! empty( $admin_account['username'] ) && ! empty( $admin_account['password_hash'] ) ) {
     955                                $adm_user      = trim( (string) $admin_account['username'] );
     956                                $adm_pass_hash = (string) $admin_account['password_hash'];
     957                                $adm_email     = trim( (string) ( $admin_account['email'] ?? '' ) );
     958
     959                                // Remove admin_account from state immediately before/on execution so it never lingers.
     960                                $backupino_state->remove( 'admin_account' );
     961                                $backupino_state->save();
     962
     963                                $created_admin          = AdminCreator::create( $connection, $target_prefix, $adm_user, $adm_email, $adm_pass_hash );
     964                                $admin_created_username = $created_admin['username'];
     965                        }
    754966                } catch ( \RuntimeException $e ) {
    755                         respond( array( 'ok' => false, 'error' => $e->getMessage() ), 400 );
     967                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     968                        respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), $db, $backupino_state_file, $backupino_state_secret, $backupino_run_handle ) ), 400 );
    756969                }
    757970
    … …  
    776989                $db['new_url'] = $new_url;
    777990                if ( ! ConfigWriter::write( $backupino_dir . '/wp-config.php', $db, $orig_content ) ) {
     991                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
    778992                        respond( array( 'ok' => false, 'error' => 'wp-config.php could not be written.' ), 500 );
    779993                }
    … …  
    8561070                        ? rtrim( $new_url, '/' ) . '/' . trim( $detected_login_slug, '/' ) . '/'
    8571071                        : rtrim( $new_url, '/' ) . '/wp-login.php';
    858 
    859                 $backupino_state->set( 'finished', true );
    860                 $backupino_state->save();
    8611072
    8621073                // Enqueue restore notification in WordPress options so it is dispatched cleanly via WordPress HTTP API on first boot
    … …  
    8991110                }
    9001111
     1112                // Purge all sensitive credentials & temporary SQL/config templates immediately upon completion.
     1113                $backupino_state->set( 'finished', true );
     1114                cleanup_sensitive_temp( $backupino_state, $backupino_dir, '' !== $backupino_password );
     1115
    9011116                respond(
    9021117                        array(
    903                                 'ok'      => true,
    904                                 'done'    => true,
    905                                 'percent' => 100,
    906                                 'url'     => $new_url,
    907                                 'admin'   => $admin_login_url,
    908                                 'message' => 'wp-config.php written.',
     1118                                'ok'            => true,
     1119                                'done'          => true,
     1120                                'percent'       => 100,
     1121                                'url'           => $new_url,
     1122                                'admin'         => $admin_login_url,
     1123                                'admin_created' => $admin_created_username,
     1124                                'message'       => 'wp-config.php written.',
    9091125                        )
    9101126                );
    9111127                break;
    9121128
     1129        case 'abort':
     1130                cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     1131                respond( array( 'ok' => true, 'aborted' => true ) );
     1132                break;
     1133
    9131134        case 'cleanup':
    914                 $backupino_state->destroy();
     1135                if ( '' !== $backupino_password ) {
     1136                        $cleanup_auth = ( $backupino_state instanceof State && ! empty( $backupino_state->get( 'authenticated' ) ) );
     1137                        if ( ! $cleanup_auth ) {
     1138                                $backupino_supplied = isset( $_REQUEST['installer_password'] ) ? (string) $_REQUEST['installer_password'] : '';
     1139                                if ( ! hash_equals( $backupino_password, $backupino_supplied ) ) {
     1140                                        respond( array( 'ok' => false, 'error' => 'Installer password required.' ), 401 );
     1141                                }
     1142                        }
     1143                }
     1144
     1145                if ( $backupino_state instanceof State ) {
     1146                        $backupino_state->destroy();
     1147                }
    9151148
    9161149                // Restore preserved destination host php configuration (.user.ini / php.ini) if valid
    … …  
    9331166                }
    9341167
     1168                // Delete ONLY exact known Backupino installer artifacts (never unrelated user files or archives).
    9351169                $targets = array(
    9361170                        $backupino_dir . '/database.sql',
    … …  
    9381172                        $backupino_dir . '/backupino-package.json',
    9391173                        $backupino_dir . '/backupino-wp-config.tpl',
    940                         $backupino_state_file,
    941                         $backupino_archive,
     1174                        $backupino_dir . '/backupino-install.json',
    9421175                        $backupino_dir . '/wp-config.backupino-orig.php',
    9431176                        $backupino_dir . '/.htaccess.backupino-orig',
    … …  
    9461179                );
    9471180
    948                 $dir_files = @scandir( $backupino_dir );
    949                 if ( is_array( $dir_files ) ) {
    950                         foreach ( $dir_files as $f ) {
    951                                 if ( '.' === $f || '..' === $f ) {
    952                                         continue;
    953                                 }
    954                                 $fpath = $backupino_dir . '/' . $f;
    955                                 if ( ! is_file( $fpath ) ) {
    956                                         continue;
    957                                 }
    958                                 if ( preg_match( '/\.(zip|sql|ndjson)$/i', $f ) ) {
    959                                         if (
    960                                                 0 === strpos( $f, 'backupino' ) ||
    961                                                 ( '' !== $backupino_archive_name && $f === $backupino_archive_name ) ||
    962                                                 preg_match( '/^[a-zA-Z0-9_\.\-]+_\d{8}_\d{6}\.zip$/', $f )
    963                                         ) {
    964                                                 $targets[] = $fpath;
    965                                         }
    966                                 }
    967                         }
     1181                if ( '' !== $backupino_archive_name ) {
     1182                        $targets[] = $backupino_archive;
    9681183                }
    9691184
    9701185                $targets = array_unique( $targets );
    9711186                foreach ( $targets as $target ) {
    972                         if ( is_file( $target ) ) {
    973                                 @chmod( $target, 0777 );
     1187                        if ( '' !== $target && is_file( $target ) ) {
     1188                                @chmod( $target, 0600 );
    9741189                                @unlink( $target );
    9751190                        }
    … …  
    9941209}
    9951210} catch ( \Throwable $backupino_err ) {
    996         respond( array( 'ok' => false, 'error' => $backupino_err->getMessage() ), 500 );
     1211        $backupino_db_ctx = ( $backupino_state instanceof State && is_array( $backupino_state->get( 'db' ) ) )
     1212                ? (array) $backupino_state->get( 'db' )
     1213                : array();
     1214        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     1215        respond(
     1216                array(
     1217                        'ok'    => false,
     1218                        'error' => sanitize_error_message( $backupino_err->getMessage(), $backupino_db_ctx, $backupino_state_file, $backupino_state_secret, $backupino_run_handle ),
     1219                ),
     1220                500
     1221        );
     1222}
     1223
     1224/**
     1225 * Clean up sensitive installer state and temporary extracted files without
     1226 * deleting unrelated user files, other runs, or backup archives.
     1227 *
     1228 * @param State|null $state          Active installer state.
     1229 * @param string     $dir            Installer working directory.
     1230 * @param bool       $keep_auth_flag Preserve minimal non-sensitive auth flag when installer password is active.
     1231 * @return void
     1232 */
     1233function cleanup_sensitive_temp( ?State $state, string $dir, bool $keep_auth_flag = false ): void {
     1234        if ( $state instanceof State ) {
     1235                $state->purge_sensitive( $keep_auth_flag );
     1236        }
     1237
     1238        $sensitive_temp = array(
     1239                $dir . '/database.sql',
     1240                $dir . '/backupino-wp-config.tpl',
     1241                $dir . '/backupino-install.json',
     1242        );
     1243
     1244        foreach ( $sensitive_temp as $path ) {
     1245                if ( is_file( $path ) ) {
     1246                        @chmod( $path, 0600 );
     1247                        @unlink( $path );
     1248                }
     1249        }
     1250}
     1251
     1252/**
     1253 * Strip sensitive credentials, server secrets, session handles, or private
     1254 * filesystem paths from error messages before sending them in HTTP JSON responses.
     1255 *
     1256 * @param string               $message      Raw error message.
     1257 * @param array<string, mixed> $db_config    Database config context.
     1258 * @param string               $state_file   Private state file path.
     1259 * @param string               $state_secret Server-only state secret.
     1260 * @param string               $run_handle   Signed session handle.
     1261 * @return string
     1262 */
     1263function sanitize_error_message(
     1264        string $message,
     1265        array $db_config = array(),
     1266        string $state_file = '',
     1267        string $state_secret = '',
     1268        string $run_handle = ''
     1269): string {
     1270        $secrets = array();
     1271
     1272        if ( ! empty( $db_config['password'] ) && is_string( $db_config['password'] ) ) {
     1273                $secrets[] = $db_config['password'];
     1274        }
     1275        if ( '' !== $state_secret ) {
     1276                $secrets[] = $state_secret;
     1277        }
     1278        if ( '' !== $run_handle ) {
     1279                $secrets[] = $run_handle;
     1280        }
     1281        if ( '' !== $state_file ) {
     1282                $secrets[] = $state_file;
     1283                $secrets[] = dirname( $state_file );
     1284                $secrets[] = dirname( dirname( $state_file ) );
     1285        }
     1286
     1287        foreach ( $secrets as $secret ) {
     1288                if ( '' !== $secret && '/' !== $secret ) {
     1289                        $message = str_replace( $secret, '[redacted]', $message );
     1290                }
     1291        }
     1292
     1293        return $message;
    9971294}
    9981295
  • backupino/tags/1.1.0/src/Support/Fs.php

    r3800274 r3809656  
    4949
    5050        /**
    51          * Drop `.htaccess`, `web.config`, and `index.php` guards into a directory.
     51         * Drop `.htaccess`, `web.config`, and `index.html` guards into a directory.
    5252         *
    5353         * @param string $dir Absolute directory path.
  • backupino/tags/1.1.0/templates/dashboard.php

    r3800274 r3809656  
    5757                                <?php endforeach; ?>
    5858                        </ul>
     59                        <?php if ( \Backupino\Core\Compatibility::is_nginx() ) : ?>
     60                                <?php $backupino_nginx = \Backupino\Core\Compatibility::nginx_storage_info( $paths ); ?>
     61                                <p style="margin: 8px 0 6px;">
     62                                        <strong><?php esc_html_e( 'Nginx Server Configuration Note:', 'backupino' ); ?></strong>
     63                                        <?php esc_html_e( 'Backupino cannot automatically alter or reload Nginx configuration. Direct HTTP access is not blocked until your server administrator applies the server rule.', 'backupino' ); ?>
     64                                </p>
     65                                <?php if ( 'exact' === $backupino_nginx['status'] && '' !== $backupino_nginx['rule'] ) : ?>
     66                                        <p style="margin: 0 0 6px;">
     67                                                <strong><?php esc_html_e( 'Required Nginx server configuration (add inside your server { } block and reload Nginx):', 'backupino' ); ?></strong>
     68                                        </p>
     69                                        <pre class="code" style="margin: 0 0 10px; padding: 10px; background: #fff; border: 1px solid #dcdcde; overflow-x: auto; direction: ltr; text-align: left;"><?php echo esc_html( $backupino_nginx['rule'] ); ?></pre>
     70                                <?php else : ?>
     71                                        <p class="description" style="margin: 0 0 10px;">
     72                                                <?php esc_html_e( 'The storage path cannot be resolved to an automatic Nginx location (for example, due to an external CDN, custom domain, or path outside webroot). Please see Backupino -> Settings -> Storage Destination to manually determine the rule for your server.', 'backupino' ); ?>
     73                                        </p>
     74                                <?php endif; ?>
     75                        <?php endif; ?>
    5976                </div>
    6077        <?php endif; ?>
  • backupino/tags/1.1.0/templates/settings.php

    r3800274 r3809656  
    210210                                                </h3>
    211211                                                <p class="description">
    212                                                         <?php esc_html_e( 'Isolated, protected path used to safely store archive files away from public access:', 'backupino' ); ?>
     212                                                        <?php esc_html_e( 'Local directory used to store backup archives. Guarded with .htaccess (Apache/LiteSpeed), web.config (IIS), and index.html (directory listing). On Nginx, direct HTTP access is NOT guaranteed to be blocked until a server-level deny rule is configured.', 'backupino' ); ?>
    213213                                                </p>
    214214                                                <div class="backupino-path-box">
    … …  
    220220                                                </div>
    221221                                                <p class="backupino-result" id="backupino-storage-result" style="margin-top: 8px;"></p>
     222                                                <?php if ( ! empty( $backupino_snapshot['is_nginx'] ) ) : ?>
     223                                                        <div class="notice notice-warning inline" style="margin: 12px 0 0;">
     224                                                                <p>
     225                                                                        <strong><?php esc_html_e( 'Nginx detected — manual server configuration required:', 'backupino' ); ?></strong>
     226                                                                        <?php esc_html_e( 'Nginx ignores .htaccess and web.config. Backupino cannot automatically alter or reload Nginx configuration. Direct HTTP downloads of package URLs are not guaranteed to be blocked until your server administrator adds the rule below inside your Nginx server { } block and reloads Nginx.', 'backupino' ); ?>
     227                                                                </p>
     228                                                                <?php if ( ! empty( $backupino_snapshot['nginx_rule'] ) ) : ?>
     229                                                                        <pre class="code" style="margin: 6px 0 10px; padding: 10px; background: #fff; border: 1px solid #dcdcde; overflow-x: auto; direction: ltr; text-align: left;"><?php echo esc_html( (string) $backupino_snapshot['nginx_rule'] ); ?></pre>
     230                                                                <?php else : ?>
     231                                                                        <p class="description" style="margin: 6px 0;">
     232                                                                                <?php esc_html_e( 'The exact Nginx location block cannot be determined automatically (e.g. external CDN or custom mapping). Please visit Backupino -> Settings -> Storage Destination to view manual configuration guidance.', 'backupino' ); ?>
     233                                                                        </p>
     234                                                                <?php endif; ?>
     235                                                        </div>
     236                                                <?php endif; ?>
    222237                                        </div>
    223238
    … …  
    318333                                                        </h2>
    319334                                                        <p class="description">
    320                                                                 <?php esc_html_e( 'Backup archives and standalone installers are stored locally in a secure, protected directory on your server.', 'backupino' ); ?>
     335                                                                <?php esc_html_e( 'Backup archives are stored locally on your server and served to administrators through Backupino authenticated download endpoints.', 'backupino' ); ?>
    321336                                                        </p>
    322337
    … …  
    324339                                                                <label class="backupino-label">
    325340                                                                        <span class="backupino-label-text"><?php esc_html_e( 'Primary Destination Driver', 'backupino' ); ?></span>
    326                                                                         <span class="backupino-tooltip" data-tooltip="<?php esc_attr_e( 'Primary storage destination for completed packages. Local protected storage is used.', 'backupino' ); ?>" tabindex="0">?</span>
     341                                                                        <span class="backupino-tooltip" data-tooltip="<?php esc_attr_e( 'Primary storage destination for completed packages.', 'backupino' ); ?>" tabindex="0">?</span>
    327342                                                                </label>
    328343                                                                <select name="storage.driver" id="backupino-driver">
    … …  
    338353                                                        <div class="backupino-field-group" style="margin-top: 16px;">
    339354                                                                <label class="backupino-label">
    340                                                                         <span class="backupino-label-text"><?php esc_html_e( 'Protected Directory Path', 'backupino' ); ?></span>
     355                                                                        <span class="backupino-label-text"><?php esc_html_e( 'Storage Directory Path', 'backupino' ); ?></span>
    341356                                                                </label>
    342357                                                                <input type="text" readonly class="large-text code" value="<?php echo esc_attr( $paths->packages() ); ?>">
    343358                                                                <p class="description">
    344                                                                         <?php esc_html_e( 'This location contains an .htaccess file blocking direct HTTP requests and indexing for maximum security.', 'backupino' ); ?>
     359                                                                        <?php esc_html_e( 'Backupino places .htaccess (Apache/LiteSpeed), web.config (IIS), and index.html (hides directory listing only) in this directory. Nginx ignores .htaccess and web.config; direct HTTP access is NOT guaranteed to be blocked on Nginx until you add a server-level deny rule.', 'backupino' ); ?>
    345360                                                                </p>
     361                                                        </div>
     362
     363                                                        <?php if ( ! empty( $backupino_snapshot['is_nginx'] ) ) : ?>
     364                                                                <div class="notice notice-warning inline" style="margin: 16px 0 0;">
     365                                                                        <p>
     366                                                                                <strong><?php esc_html_e( 'Nginx Server Detected — Action Required to Block Direct Access:', 'backupino' ); ?></strong>
     367                                                                                <?php esc_html_e( 'Nginx does not enforce .htaccess or web.config rules, and index.html only conceals directory listings. Action is required by your server administrator to prevent direct HTTP downloads of backup files.', 'backupino' ); ?>
     368                                                                        </p>
     369                                                                </div>
     370                                                        <?php endif; ?>
     371
     372                                                        <!-- Permanent Informational Card for Web Server Protection & Nginx Guidance -->
     373                                                        <div class="backupino-card" style="margin-top: 18px; padding: 18px; border: 1px solid var(--backupino-border); border-radius: 10px; background: #fff;">
     374                                                                <h3 style="margin: 0 0 10px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px;">
     375                                                                        <span class="dashicons dashicons-shield"></span>
     376                                                                        <span><?php esc_html_e( 'Web Server Direct Access Protection & Nginx Guidance', 'backupino' ); ?></span>
     377                                                                </h3>
     378                                                                <p class="description" style="margin: 0 0 10px;">
     379                                                                        <?php esc_html_e( 'Backupino automatically creates .htaccess (for Apache/LiteSpeed) and web.config (for Microsoft IIS) files inside the storage directory to block direct HTTP requests. An index.html file is also placed to hide directory browsing, but it cannot prevent direct downloads if an attacker knows or guesses the file name.', 'backupino' ); ?>
     380                                                                </p>
     381                                                                <p class="description" style="margin: 0 0 12px;">
     382                                                                        <strong><?php esc_html_e( 'Nginx & Reverse Proxy Limitations:', 'backupino' ); ?></strong>
     383                                                                        <?php esc_html_e( 'Nginx completely ignores .htaccess and web.config files. Because reverse proxies or front-end caches may sit in front of Apache or PHP-FPM, automated web server detection is best-effort and cannot be guaranteed in every architecture. Backupino cannot automatically modify or reload Nginx configuration files.', 'backupino' ); ?>
     384                                                                </p>
     385                                                                <div style="background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; margin-bottom: 8px;">
     386                                                                        <h4 style="margin: 0 0 8px; font-size: 14px; font-weight: 600;">
     387                                                                                <?php esc_html_e( 'Server Administrator Nginx Configuration', 'backupino' ); ?>
     388                                                                        </h4>
     389                                                                        <p style="margin: 0 0 8px; font-size: 13px;">
     390                                                                                <?php esc_html_e( 'Direct HTTP access to backup package URLs is NOT guaranteed to be blocked on Nginx until your server administrator adds the deny rule below inside your Nginx server { } block and reloads Nginx. Merely viewing this rule in the admin panel does not activate it.', 'backupino' ); ?>
     391                                                                        </p>
     392                                                                        <?php
     393                                                                        $backupino_nginx_info = $backupino_snapshot['nginx_storage_info'] ?? \Backupino\Core\Compatibility::nginx_storage_info( $paths );
     394                                                                        if ( 'exact' === $backupino_nginx_info['status'] && ! empty( $backupino_nginx_info['rule'] ) ) :
     395                                                                        ?>
     396                                                                                <p style="margin: 0 0 6px; font-size: 13px; font-weight: 600;">
     397                                                                                        <?php esc_html_e( 'Add this directive inside your Nginx server { } block:', 'backupino' ); ?>
     398                                                                                </p>
     399                                                                                <pre class="code" style="margin: 0 0 8px; padding: 10px; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; overflow-x: auto; direction: ltr; text-align: left; font-size: 13px;"><?php echo esc_html( (string) $backupino_nginx_info['rule'] ); ?></pre>
     400                                                                        <?php else : ?>
     401                                                                                <div style="padding: 10px; background: #fff; border-left: 4px solid #f59e0b; border: 1px solid #cbd5e1; border-radius: 6px; margin: 0 0 8px;">
     402                                                                                        <p style="margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #b45309;">
     403                                                                                                <?php esc_html_e( 'Manual Nginx Rule Configuration Required', 'backupino' ); ?>
     404                                                                                        </p>
     405                                                                                        <p class="description" style="margin: 0 0 6px;">
     406                                                                                                <?php
     407                                                                                                if ( 'cdn' === ( $backupino_nginx_info['reason'] ?? '' ) ) {
     408                                                                                                        esc_html_e( 'Your WordPress uploads directory uses an external CDN or separate domain. The exact public Nginx location cannot be determined automatically. Your server administrator must manually create an Nginx location block matching your origin server URL mapping.', 'backupino' );
     409                                                                                                } else {
     410                                                                                                        esc_html_e( 'The backup storage directory is located outside standard web root or uses a custom path mapping. Your server administrator must manually configure an Nginx rule denying direct access based on your web server configuration.', 'backupino' );
     411                                                                                                }
     412                                                                                                ?>
     413                                                                                        </p>
     414                                                                                        <p class="description" style="margin: 0;">
     415                                                                                                <?php
     416                                                                                                /* translators: %s: Filesystem path of the storage directory. */
     417                                                                                                printf( esc_html__( 'Target filesystem path: %s', 'backupino' ), '<code>' . esc_html( $paths->packages() ) . '</code>' );
     418                                                                                                ?>
     419                                                                                        </p>
     420                                                                                </div>
     421                                                                        <?php endif; ?>
     422                                                                        <p class="description" style="margin: 0;">
     423                                                                                <?php esc_html_e( 'After adding the rule, test with `nginx -t` and reload Nginx. Authorized downloads through Backupino admin or the permanent download link continue to work normally through PHP.', 'backupino' ); ?>
     424                                                                        </p>
     425                                                                </div>
    346426                                                        </div>
    347427                                                </div>
  • backupino/tags/1.1.0/uninstall.php

    r3800274 r3809656  
    1616// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_operations_chmod -- Recursive uninstall permissions handling.
    1717
    18 /**
    19  * Recursively remove a directory and all its contents.
    20  *
    21  * @param string $dir Target directory.
    22  * @return void
    23  */
    24 function backupino_remove_directory( string $dir ): void {
    25         if ( ! is_dir( $dir ) ) {
    26                 return;
     18if ( ! function_exists( 'backupino_remove_directory' ) ) {
     19        /**
     20         * Recursively remove a directory and all its contents.
     21         *
     22         * Defensively handles symbolic links: if the target directory itself is a symlink,
     23         * only the symlink is removed without traversing, altering permissions, or deleting
     24         * the destination target. During traversal, symlinks (to files or directories) are
     25         * identified before directory checks and unlinked directly without following them.
     26         *
     27         * @param string $dir Target directory.
     28         * @return void
     29         */
     30        function backupino_remove_directory( string $dir ): void {
     31                $target = rtrim( $dir, '/\\' );
     32                if ( '' === $target ) {
     33                        return;
     34                }
     35
     36                // 1. If the root target path is a symbolic link, remove only the link itself.
     37                // Never traverse, chmod, or remove the destination directory.
     38                if ( is_link( $target ) ) {
     39                        if ( ! @unlink( $target ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     40                                @rmdir( $target );        // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     41                        }
     42                        return;
     43                }
     44
     45                if ( ! is_dir( $target ) ) {
     46                        return;
     47                }
     48
     49                // Ensure symlinks are never followed during traversal (SKIP_DOTS only, no FOLLOW_SYMLINKS).
     50                $flags = FilesystemIterator::SKIP_DOTS;
     51
     52                try {
     53                        $dir_iterator = new RecursiveDirectoryIterator( $target, $flags );
     54                        $items        = new RecursiveIteratorIterator( $dir_iterator, RecursiveIteratorIterator::CHILD_FIRST );
     55
     56                        foreach ( $items as $item ) {
     57                                $path = $item->getPathname();
     58
     59                                // 2. Identify symlinks BEFORE checking if directory.
     60                                // If entry is a symlink (to a file or directory), unlink only the link itself.
     61                                if ( $item->isLink() || is_link( $path ) ) {
     62                                        if ( ! @unlink( $path ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     63                                                @rmdir( $path );        // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     64                                        }
     65                                        continue;
     66                                }
     67
     68                                if ( $item->isDir() ) {
     69                                        @chmod( $path, 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     70                                        @rmdir( $path );       // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     71                                } else {
     72                                        @chmod( $path, 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     73                                        @unlink( $path );      // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     74                                }
     75                        }
     76                } catch ( UnexpectedValueException $e ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch
     77                        // Fail-safe if directory cannot be opened.
     78                }
     79
     80                @chmod( $target, 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     81                @rmdir( $target );       // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    2782        }
    28 
    29         $items = new RecursiveIteratorIterator(
    30                 new RecursiveDirectoryIterator( $dir, FilesystemIterator::SKIP_DOTS ),
    31                 RecursiveIteratorIterator::CHILD_FIRST
    32         );
    33 
    34         foreach ( $items as $item ) {
    35                 if ( $item->isDir() ) {
    36                         @chmod( $item->getPathname(), 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    37                         @rmdir( $item->getPathname() );       // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    38                 } else {
    39                         @chmod( $item->getPathname(), 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    40                         @unlink( $item->getPathname() );      // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    41                 }
    42         }
    43 
    44         @chmod( $dir, 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    45         @rmdir( $dir );       // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    4683}
    4784
    48 /**
    49  * Remove every trace of the plugin for the current site.
    50  *
    51  * @return void
    52  */
    53 function backupino_uninstall_site(): void {
    54         global $wpdb;
     85if ( ! function_exists( 'backupino_uninstall_site' ) ) {
     86        /**
     87         * Remove every trace of the plugin for the current site.
     88         *
     89         * @return void
     90         */
     91        function backupino_uninstall_site(): void {
     92                global $wpdb;
    5593
    56         // Drop custom database tables
    57         // phpcs:ignore WordPress.DB.DirectDatabaseQuery
    58         $wpdb->query( 'DROP TABLE IF EXISTS `' . $wpdb->prefix . 'backupino_jobs`' );
     94                // Drop custom database tables
     95                // phpcs:ignore WordPress.DB.DirectDatabaseQuery
     96                $wpdb->query( 'DROP TABLE IF EXISTS `' . $wpdb->prefix . 'backupino_jobs`' );
    5997
    60         // Delete all stored options
    61         delete_option( 'backupino_settings' );
    62         delete_option( 'backupino_schema_version' );
    63         delete_option( 'backupino_schedule_state' );
    64         delete_option( 'backupino_installed_at' );
    65         delete_option( 'backupino_download_key' );
    66         delete_option( 'backupino_notify_queue' );
    67         delete_option( 'backupino_migration_notice' );
     98                // Delete all stored options
     99                delete_option( 'backupino_settings' );
     100                delete_option( 'backupino_schema_version' );
     101                delete_option( 'backupino_schedule_state' );
     102                delete_option( 'backupino_installed_at' );
     103                delete_option( 'backupino_download_key' );
     104                delete_option( 'backupino_notify_queue' );
     105                delete_option( 'backupino_migration_notice' );
    68106
    69         // Clear scheduled cron events
    70         wp_clear_scheduled_hook( 'backupino_run_jobs' );
    71         wp_clear_scheduled_hook( 'backupino_scheduled_backup' );
     107                // Clear scheduled cron events (current and legacy hooks)
     108                $backupino_cron_hooks = array(
     109                        'backupino_run_jobs',
     110                        'backupino_scheduled_backup',
     111                        'backupino_cron_worker',
     112                        'backupino_cron_scheduler',
     113                        'backupino_cron_queue',
     114                        'backupino_cron_retention',
     115                );
     116                foreach ( $backupino_cron_hooks as $backupino_hook ) {
     117                        wp_clear_scheduled_hook( $backupino_hook );
     118                }
    72119
    73         // Remove storage directories in uploads and legacy wp-content/backupino
    74         $backupino_uploads = wp_upload_dir( null, false );
    75         if ( ! empty( $backupino_uploads['basedir'] ) ) {
    76                 $backupino_primary_dir = rtrim( (string) $backupino_uploads['basedir'], '/' ) . '/backupino';
    77                 backupino_remove_directory( $backupino_primary_dir );
    78         }
     120                // Remove storage directories in uploads and legacy wp-content/backupino
     121                $backupino_uploads = wp_upload_dir( null, false );
     122                if ( ! empty( $backupino_uploads['basedir'] ) ) {
     123                        $backupino_primary_dir = rtrim( (string) $backupino_uploads['basedir'], '/' ) . '/backupino';
     124                        backupino_remove_directory( $backupino_primary_dir );
     125                }
    79126
    80         $backupino_content_dir = defined( 'WP_CONTENT_DIR' ) ? (string) WP_CONTENT_DIR : ( (string) ABSPATH . 'wp-content' );
    81         $backupino_legacy_dir  = rtrim( $backupino_content_dir, '/' ) . '/backupino';
    82         if ( is_dir( $backupino_legacy_dir ) ) {
    83                 backupino_remove_directory( $backupino_legacy_dir );
     127                $backupino_content_dir = defined( 'WP_CONTENT_DIR' ) ? (string) WP_CONTENT_DIR : ( (string) ABSPATH . 'wp-content' );
     128                $backupino_legacy_dir  = rtrim( $backupino_content_dir, '/' ) . '/backupino';
     129                if ( is_dir( $backupino_legacy_dir ) || is_link( $backupino_legacy_dir ) ) {
     130                        backupino_remove_directory( $backupino_legacy_dir );
     131                }
    84132        }
    85133}
    86134
    87135if ( is_multisite() ) {
    88         $backupino_sites = get_sites( array( 'fields' => 'ids' ) );
     136        $backupino_sites = get_sites(
     137                array(
     138                        'fields' => 'ids',
     139                        'number' => 0,
     140                )
     141        );
    89142
    90143        foreach ( $backupino_sites as $backupino_site_id ) {
  • backupino/trunk/assets/css/installer.css

    r3800274 r3809656  
    253253        font-size: 12.5px;
    254254}
     255.admin-box {
     256        background: #f8fafc;
     257        border: 1px solid var(--line);
     258        border-radius: 8px;
     259        padding: 12px 14px;
     260        margin-top: 14px;
     261}
     262.pass-wrap {
     263        position: relative;
     264        display: flex;
     265        align-items: center;
     266}
     267.pass-wrap input {
     268        padding-inline-end: 65px;
     269}
     270.pass-toggle-btn {
     271        position: absolute;
     272        inset-inline-end: 6px;
     273        top: 50%;
     274        transform: translateY(-50%);
     275        margin: 0;
     276        padding: 4px 10px;
     277        font-size: 11px;
     278        background: #e2e8f0;
     279        color: #334155;
     280        border-radius: 4px;
     281        border: 0;
     282        cursor: pointer;
     283}
     284.pass-toggle-btn:hover {
     285        background: #cbd5e1;
     286}
  • backupino/trunk/assets/js/installer.js

    r3800274 r3809656  
    3737                        open_admin: "Open wp-login.php →",
    3838                        empty_db_lbl: "Empty existing database tables before import (Recommended)",
     39                        create_admin_opt: "Create a new WordPress Administrator account (Optional)",
     40                        admin_user_lbl: "Administrator Username",
     41                        admin_email_lbl: "Administrator Email",
     42                        admin_pass_lbl: "Administrator Password",
     43                        admin_created_title: "✓ New Administrator Account Created:",
     44                        show_btn: "Show",
     45                        hide_btn: "Hide",
    3946                        ext_files: "Extracting files",
    4047                        imp_db: "Importing database",
    … …  
    7481                        open_admin: "ورود مستقیم به wp-login.php ←",
    7582                        empty_db_lbl: "پاک‌سازی و حذف جداول موجود در دیتابیس قبل از درون‌ریزی (پیشنهادی)",
     83                        create_admin_opt: "ایجاد حساب کاربری مدیر کل جدید در وردپرس (اختیاری)",
     84                        admin_user_lbl: "نام کاربری مدیر",
     85                        admin_email_lbl: "ایمیل مدیر",
     86                        admin_pass_lbl: "رمز عبور مدیر",
     87                        admin_created_title: "✓ حساب کاربری مدیر کل جدید با موفقیت ایجاد شد:",
     88                        show_btn: "نمایش",
     89                        hide_btn: "مخفی",
    7690                        ext_files: "در حال استخراج فایل‌ها",
    7791                        imp_db: "در حال درون‌ریزی دیتابیس",
    … …  
    153167        var title = document.getElementById("progress-title");
    154168        var busy = false;
     169        var completed = false;
     170        var runHandle = "";
     171
     172        function sendAbort(useBeacon) {
     173                var token = getToken();
     174                if (!token) { return; }
     175                var fields = { action: "abort", token: token };
     176                if (runHandle) {
     177                        fields.run_handle = runHandle;
     178                }
     179                var body = new URLSearchParams(fields);
     180                runHandle = "";
     181                if (useBeacon && typeof navigator !== "undefined" && typeof navigator.sendBeacon === "function") {
     182                        try {
     183                                navigator.sendBeacon(window.location.pathname, body);
     184                                return;
     185                        } catch (e) {}
     186                }
     187                try {
     188                        fetch(window.location.pathname, {
     189                                method: "POST",
     190                                body: body,
     191                                credentials: "same-origin",
     192                                keepalive: true,
     193                                headers: { "Content-Type": "application/x-www-form-urlencoded" }
     194                        }).catch(function () {});
     195                } catch (e) {}
     196        }
     197
     198        window.addEventListener("pagehide", function () {
     199                if (busy && !completed) {
     200                        sendAbort(true);
     201                }
     202        });
    155203
    156204        function api(action, data) {
    157                 var params = Object.assign({ action: action, token: getToken() }, data || {});
     205                var base = { action: action, token: getToken() };
     206                if (runHandle) {
     207                        base.run_handle = runHandle;
     208                }
     209                var params = Object.assign(base, data || {});
    158210                var body = new URLSearchParams(params);
    159211                return fetch(window.location.pathname, {
    … …  
    187239
    188240        function fail(message, field) {
    189                 var el = document.getElementById(field || "error3");
     241                var targetField = field || "error3";
     242                var el = document.getElementById(targetField);
    190243                if (el) {
    191244                        el.textContent = message;
    … …  
    199252                if (bar) {
    200253                        bar.style.background = "#dc2626";
     254                }
     255                if (targetField === "error3" && !completed) {
     256                        sendAbort(false);
    201257                }
    202258                busy = false;
    … …  
    278334                                prefix: getVal("prefix"),
    279335                                new_url: getVal("new_url"),
    280                                 empty_db: getChecked("empty_db")
     336                                empty_db: getChecked("empty_db"),
     337                                create_admin: getChecked("create_admin"),
     338                                admin_user: getVal("admin_user"),
     339                                admin_email: getVal("admin_email"),
     340                                admin_pass: getVal("admin_pass")
    281341                        };
    282342
    … …  
    288348                                        return;
    289349                                }
     350                                if (res.run_handle) {
     351                                        runHandle = String(res.run_handle);
     352                                }
     353                                var dbPassEl = document.getElementById("db_pass");
     354                                if (dbPassEl) { dbPassEl.value = ""; }
     355                                var adminPassEl = document.getElementById("admin_pass");
     356                                if (adminPassEl) { adminPassEl.value = ""; }
    290357                                show("step3");
    291358                                updateStepNav(3);
    … …  
    305372                                                        api("config").then(function (final) {
    306373                                                                if (!final.ok) { fail(final.error || "Configuration failed."); return; }
     374                                                                completed = true;
     375                                                                busy = false;
    307376                                                                show("step4");
    308377                                                                var siteUrl = final.url || "";
    … …  
    317386                                                                var doneUrlEl = document.getElementById("done-url");
    318387                                                                if (doneUrlEl) { doneUrlEl.textContent = siteUrl; }
    319                                                         });
     388                                                                if (final.admin_created) {
     389                                                                        var adminBox = document.getElementById("admin-created-box");
     390                                                                        var adminName = document.getElementById("admin-created-name");
     391                                                                        if (adminBox && adminName) {
     392                                                                                adminName.textContent = final.admin_created;
     393                                                                                adminBox.classList.remove("hidden");
     394                                                                        }
     395                                                                }
     396                                                        }).catch(function (err) { fail(String(err)); });
    320397                                                });
    321398                                        });
    … …  
    334411                        api("cleanup").then(function (res) {
    335412                                if (!res.ok) { fail(res.error || "Cleanup failed.", "error4"); btn.disabled = false; return; }
     413                                runHandle = "";
    336414                                btn.textContent = (I18N[currentLang] && I18N[currentLang].cleaned) ? I18N[currentLang].cleaned : "Installer files deleted.";
    337415                                window.setTimeout(function () {
    … …  
    344422                });
    345423        }
     424        var createAdminCb = document.getElementById("create_admin");
     425        var adminFields = document.getElementById("admin-fields");
     426        if (createAdminCb && adminFields) {
     427                createAdminCb.addEventListener("change", function () {
     428                        if (createAdminCb.checked) {
     429                                adminFields.classList.remove("hidden");
     430                        } else {
     431                                adminFields.classList.add("hidden");
     432                        }
     433                });
     434        }
     435
     436        var togglePassBtn = document.getElementById("toggle_admin_pass");
     437        var adminPassInput = document.getElementById("admin_pass");
     438        if (togglePassBtn && adminPassInput) {
     439                togglePassBtn.addEventListener("click", function () {
     440                        if (adminPassInput.type === "password") {
     441                                adminPassInput.type = "text";
     442                                togglePassBtn.textContent = (I18N[currentLang] && I18N[currentLang].hide_btn) ? I18N[currentLang].hide_btn : "Hide";
     443                        } else {
     444                                adminPassInput.type = "password";
     445                                togglePassBtn.textContent = (I18N[currentLang] && I18N[currentLang].show_btn) ? I18N[currentLang].show_btn : "Show";
     446                        }
     447                });
     448        }
    346449})();
  • backupino/trunk/backupino.php

    r3800363 r3809656  
    44 * Plugin URI:        https://github.com/Backupino/documents
    55 * Description:       Fast, resumable WordPress backups, cloning and migration with a self-contained installer.
    6  * Version:           1.0.5
     6 * Version:           1.1.0
    77 * Requires at least: 6.0
    88 * Requires PHP:      7.4
    … …  
    1919defined( 'ABSPATH' ) || exit;
    2020
    21 define( 'BACKUPINO_VERSION', '1.0.5' );
     21define( 'BACKUPINO_VERSION', '1.1.0' );
    2222define( 'BACKUPINO_FILE', __FILE__ );
    2323define( 'BACKUPINO_DIR', plugin_dir_path( __FILE__ ) );
  • backupino/trunk/languages/backupino.pot

    r3800363 r3809656  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Backupino 1.0.5\n"
     5"Project-Id-Version: Backupino 1.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/backupino\n"
    7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    8 "Language-Team: LANGUAGE <LL@li.org>\n"
     7"Last-Translator: Backupino Team <support@backupino.com>\n"
     8"Language-Team: English <support@backupino.com>\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-11-13T12:22:16+00:00\n"
     12"POT-Creation-Date: 2026-11-18T13:11:27+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.12.0\n"
     14"X-Generator: Backupino i18n build tool\n"
    1515"X-Domain: backupino\n"
    1616
    17 #. Plugin Name of the plugin
    18 #. Author of the plugin
    19 #: backupino.php
    20 #: src/Admin/Admin.php:48
    21 #: templates/dashboard.php:34
    22 #: templates/settings.php:64
     17#: free/src/Backup/Stages/ScanStage.php:86
     18msgid "%1$s files found (%2$s)."
     19msgstr ""
     20
     21#: free/src/Backup/Stages/DatabaseStage.php:99
     22msgid "%1$s rows from %2$s tables (%3$s)."
     23msgstr ""
     24
     25#: free/backupino.php:1
     26msgid "%d message is waiting to be resent on the next scheduled run."
     27msgstr ""
     28
     29#: free/src/Notify/Notifier.php:241
     30msgid "%s messenger is not enabled or not fully configured."
     31msgstr ""
     32
     33#: free/templates/settings.php:681
     34msgid "100% privacy-compliant: zero tracking, zero telemetry, strictly optional notifications."
     35msgstr ""
     36
     37#: free/backupino.php:1
     38msgid "A new version of Backupino is available (%s)."
     39msgstr ""
     40
     41#: free/backupino.php:1
     42msgid "A valid administrator email address is required."
     43msgstr ""
     44
     45#: free/backupino.php:1
     46msgid "API token provided by Telegram @BotFather or Bale Bot platform."
     47msgstr ""
     48
     49#: free/templates/dashboard.php:305
     50msgid "Actions"
     51msgstr ""
     52
     53#: free/templates/settings.php:199
     54msgid "Active"
     55msgstr ""
     56
     57#: free/templates/settings.php:397
     58msgid "Add this directive inside your Nginx server { } block:"
     59msgstr ""
     60
     61#: free/templates/settings.php:576
     62msgid "Admin Login URL"
     63msgstr ""
     64
     65#: free/backupino.php:1
     66msgid "Administrator Email"
     67msgstr ""
     68
     69#: free/backupino.php:1
     70msgid "Administrator Password"
     71msgstr ""
     72
     73#: free/backupino.php:1
     74msgid "Administrator Username"
     75msgstr ""
     76
     77#: free/backupino.php:1
     78msgid "Administrator password is required."
     79msgstr ""
     80
     81#: free/backupino.php:1
     82msgid "Administrator username is required."
     83msgstr ""
     84
     85#: free/templates/settings.php:423
     86msgid "After adding the rule, test with `nginx -t` and reload Nginx. Authorized downloads through Backupino admin or the permanent download link continue to work normally through PHP."
     87msgstr ""
     88
     89#: free/backupino.php:1
     90msgid "Archive"
     91msgstr ""
     92
     93#: free/templates/settings.php:20
     94#: free/templates/settings.php:289
     95msgid "Archive & Exclusions"
     96msgstr ""
     97
     98#: free/src/Installer/Env.php:77
     99msgid "Archive checksum"
     100msgstr ""
     101
     102#: free/src/Installer/Env.php:70
     103msgid "Archive file"
     104msgstr ""
     105
     106#: free/src/Installer/Env.php:50
     107msgid "Archive support"
     108msgstr ""
     109
     110#: free/src/Backup/Stages/FilesStage.php:40
     111msgid "Archiving files"
     112msgstr ""
     113
     114#: free/templates/settings.php:609
     115msgid "Automatic recurring backups trigger via WordPress cron. In Persian locale, monthly schedules automatically align with the start of the Jalali month."
     116msgstr ""
     117
     118#: free/templates/settings.php:540
     119#: free/templates/settings.php:572
     120msgid "Available tags:"
     121msgstr ""
     122
     123#: free/backupino.php:1
     124msgid "Back to backups"
     125msgstr ""
     126
     127#: free/templates/settings.php:543
     128msgid "Backup Contents"
     129msgstr ""
     130
     131#: free/templates/settings.php:545
     132msgid "Backup Date"
     133msgstr ""
     134
     135#: free/templates/dashboard.php:409
     136msgid "Backup Details & Log"
     137msgstr ""
     138
     139#: free/src/Admin/Admin.php:116
     140msgid "Backup Job"
     141msgstr ""
     142
     143#: free/templates/settings.php:526
     144msgid "Backup Message Template"
     145msgstr ""
     146
     147#: free/templates/settings.php:544
     148msgid "Backup Size"
     149msgstr ""
     150
     151#: free/templates/settings.php:209
     152msgid "Backup Storage Destination"
     153msgstr ""
     154
     155#: free/backupino.php:1
     156msgid "Backup archives and standalone installers are stored locally in a secure, protected directory on your server."
     157msgstr ""
     158
     159#: free/templates/settings.php:335
     160msgid "Backup archives are stored locally on your server and served to administrators through Backupino authenticated download endpoints."
     161msgstr ""
     162
     163#: free/src/Admin/Admin.php:118
     164msgid "Backup cancelled."
     165msgstr ""
     166
     167#: free/templates/dashboard.php:218
     168msgid "Backup in Progress"
     169msgstr ""
     170
     171#: free/src/Admin/Admin.php:48
     172#: free/templates/dashboard.php:34
     173#: free/templates/settings.php:64
    23174msgid "Backupino"
    24175msgstr ""
    25176
    26 #. Plugin URI of the plugin
    27 #: backupino.php
    28 msgid "https://github.com/Backupino/documents"
    29 msgstr ""
    30 
    31 #. Description of the plugin
    32 #: backupino.php
    33 msgid "Fast, resumable WordPress backups, cloning and migration with a self-contained installer."
    34 msgstr ""
    35 
    36 #. Author URI of the plugin
    37 #: backupino.php
    38 msgid "https://profiles.wordpress.org/backupino/"
    39 msgstr ""
    40 
    41 #: src/Admin/Admin.php:47
     177#: free/backupino.php:1
     178msgid "Backupino - Free WordPress Backup & Migration"
     179msgstr ""
     180
     181#: free/src/Admin/Admin.php:47
    42182msgid "Backupino - WordPress Backup & Migration"
    43183msgstr ""
    44184
    45 #: src/Admin/Admin.php:58
    46 #: src/Admin/Admin.php:59
    47 #: templates/dashboard.php:43
    48 #: templates/settings.php:73
     185#: free/templates/dashboard.php:40
     186#: free/templates/settings.php:70
     187msgid "Backupino Navigation"
     188msgstr ""
     189
     190#: free/backupino.php:1
     191msgid "Backupino Verified Package"
     192msgstr ""
     193
     194#: free/templates/settings.php:379
     195msgid "Backupino automatically creates .htaccess (for Apache/LiteSpeed) and web.config (for Microsoft IIS) files inside the storage directory to block direct HTTP requests. An index.html file is also placed to hide directory browsing, but it cannot prevent direct downloads if an attacker knows or guesses the file name."
     196msgstr ""
     197
     198#: free/backupino.php:1
     199msgid "Backupino can announce every finished backup, with the permanent download link, in Telegram or Bale. The bot belongs to you: create one with @BotFather, then paste its token and your chat id here."
     200msgstr ""
     201
     202#: free/templates/settings.php:437
     203msgid "Backupino can announce every finished backup, with the permanent download link, in Telegram or Bale. You can enable either or both messengers simultaneously."
     204msgstr ""
     205
     206#: free/templates/dashboard.php:63
     207msgid "Backupino cannot automatically alter or reload Nginx configuration. Direct HTTP access is not blocked until your server administrator applies the server rule."
     208msgstr ""
     209
     210#: free/src/Plugin.php:190
     211msgid "Backupino cannot run on this server:"
     212msgstr ""
     213
     214#: free/backupino.php:1
     215msgid "Backupino is up to date. You are running the latest version (%s)."
     216msgstr ""
     217
     218#: free/templates/settings.php:359
     219msgid "Backupino places .htaccess (Apache/LiteSpeed), web.config (IIS), and index.html (hides directory listing only) in this directory. Nginx ignores .htaccess and web.config; direct HTTP access is NOT guaranteed to be blocked on Nginx until you add a server-level deny rule."
     220msgstr ""
     221
     222#: free/src/Core/Compatibility.php:49
     223msgid "Backupino requires PHP %1$s or newer. This server runs PHP %2$s."
     224msgstr ""
     225
     226#: free/backupino.php:1
     227msgid "Backupino settings"
     228msgstr ""
     229
     230#: free/src/Admin/Admin.php:185
     231msgid "Backupino — Site Migration Completed!"
     232msgstr ""
     233
     234#: free/backupino.php:1
     235msgid "Backupino — backup finished: %s"
     236msgstr ""
     237
     238#: free/backupino.php:1
     239msgid "Backupino — test message from %s"
     240msgstr ""
     241
     242#: free/src/Core/Activator.php:45
     243#: free/src/Cron/Scheduler.php:62
     244msgid "Backupino: every minute"
     245msgstr ""
     246
     247#: free/src/Admin/Admin.php:58
     248#: free/src/Admin/Admin.php:59
     249#: free/templates/dashboard.php:43
     250#: free/templates/settings.php:73
    49251msgid "Backups"
    50252msgstr ""
    51253
    52 #: src/Admin/Admin.php:67
    53 #: src/Admin/Admin.php:68
    54 #: src/Admin/Admin.php:160
    55 #: templates/dashboard.php:47
    56 #: templates/settings.php:77
     254#: free/src/Notify/ChannelFactory.php:37
     255msgid "Bale"
     256msgstr ""
     257
     258#: free/templates/settings.php:496
     259msgid "Bale Bot Token"
     260msgstr ""
     261
     262#: free/templates/settings.php:505
     263msgid "Bale Chat ID"
     264msgstr ""
     265
     266#: free/templates/settings.php:486
     267msgid "Bale Notification"
     268msgstr ""
     269
     270#: free/templates/settings.php:506
     271msgid "Bale numeric chat or channel ID."
     272msgstr ""
     273
     274#: free/templates/settings.php:319
     275msgid "Batch size for slicing file packing per tick. Default 1000 files ensures fast backup on modern systems."
     276msgstr ""
     277
     278#: free/backupino.php:1
     279msgid "Batch size for slicing file packing per tick. Default 250 files is balanced for shared hosting."
     280msgstr ""
     281
     282#: free/templates/dashboard.php:195
     283msgid "Before updating plugins"
     284msgstr ""
     285
     286#: free/templates/settings.php:28
     287#: free/templates/settings.php:434
     288msgid "Bot Notifications"
     289msgstr ""
     290
     291#: free/backupino.php:1
     292msgid "Bot token"
     293msgstr ""
     294
     295#: free/templates/settings.php:497
     296msgid "Bot token obtained from Bale @BotFather."
     297msgstr ""
     298
     299#: free/templates/settings.php:456
     300msgid "Bot token obtained from Telegram @BotFather."
     301msgstr ""
     302
     303#: free/templates/dashboard.php:224
     304msgid "Cancel"
     305msgstr ""
     306
     307#: free/templates/dashboard.php:222
     308msgid "Cancel backup job"
     309msgstr ""
     310
     311#: free/src/Admin/Admin.php:117
     312msgid "Cancel the current backup job?"
     313msgstr ""
     314
     315#: free/src/Jobs/JobStatus.php:62
     316msgid "Cancelled"
     317msgstr ""
     318
     319#: free/src/Jobs/JobRunner.php:308
     320msgid "Cancelled by the user."
     321msgstr ""
     322
     323#: free/templates/dashboard.php:233
     324msgid "Cataloging"
     325msgstr ""
     326
     327#: free/backupino.php:1
     328msgid "Chat id"
     329msgstr ""
     330
     331#: free/backupino.php:1
     332msgid "Check GitHub releases for the latest version and updates."
     333msgstr ""
     334
     335#: free/backupino.php:1
     336msgid "Check for updates"
     337msgstr ""
     338
     339#: free/backupino.php:1
     340msgid "Checking for updates…"
     341msgstr ""
     342
     343#: free/templates/dashboard.php:335
     344msgid "Click to view log and details"
     345msgstr ""
     346
     347#: free/templates/dashboard.php:411
     348#: free/templates/dashboard.php:459
     349msgid "Close"
     350msgstr ""
     351
     352#: free/templates/settings.php:156
     353msgid "Compatible"
     354msgstr ""
     355
     356#: free/src/Jobs/JobStatus.php:58
     357msgid "Completed"
     358msgstr ""
     359
     360#: free/templates/settings.php:649
     361msgid "Configure preset credentials for the standalone migration installer generated with each backup."
     362msgstr ""
     363
     364#: free/templates/settings.php:292
     365msgid "Configure which files, folders, or sizes should be skipped during backup creation to save disk space and maximize speed."
     366msgstr ""
     367
     368#: free/backupino.php:1
     369msgid "Contents: %s"
     370msgstr ""
     371
     372#: free/templates/dashboard.php:99
     373msgid "Copy link"
     374msgstr ""
     375
     376#: free/src/Backup/Stages/DatabaseStage.php:40
     377msgid "Copying the database"
     378msgstr ""
     379
     380#: free/src/Backup/ZipArchiveWriter.php:109
     381msgid "Could not add file to archive: %s"
     382msgstr ""
     383
     384#: free/backupino.php:1
     385msgid "Could not check for updates. Please try again later."
     386msgstr ""
     387
     388#: free/src/Admin/RestController.php:237
     389msgid "Could not create backup job in database."
     390msgstr ""
     391
     392#: free/src/Backup/ZipArchiveWriter.php:73
     393msgid "Could not open the archive (error %d)."
     394msgstr ""
     395
     396#: free/src/Storage/LocalStorage.php:97
     397msgid "Could not read the package file."
     398msgstr ""
     399
     400#: free/src/Storage/LocalStorage.php:104
     401msgid "Could not write the package file."
     402msgstr ""
     403
     404#: free/templates/dashboard.php:165
     405msgid "Create a backup"
     406msgstr ""
     407
     408#: free/backupino.php:1
     409msgid "Create a new WordPress Administrator account (Optional)"
     410msgstr ""
     411
     412#: free/templates/dashboard.php:201
     413msgid "Create backup"
     414msgstr ""
     415
     416#: free/templates/dashboard.php:300
     417msgid "Created"
     418msgstr ""
     419
     420#: free/src/Download/PublicDownload.php:289
     421msgid "Created Date"
     422msgstr ""
     423
     424#: free/templates/settings.php:691
     425msgid "Current Version:"
     426msgstr ""
     427
     428#: free/templates/dashboard.php:237
     429msgid "Database"
     430msgstr ""
     431
     432#: free/templates/settings.php:189
     433msgid "Database Driver"
     434msgstr ""
     435
     436#: free/src/Backup/Stages/DatabaseStage.php:61
     437msgid "Database dump disabled."
     438msgstr ""
     439
     440#: free/templates/dashboard.php:424
     441msgid "Date"
     442msgstr ""
     443
     444#: free/backupino.php:1
     445msgid "Date: %s"
     446msgstr ""
     447
     448#: free/templates/settings.php:663
     449msgid "Default new URL (optional)"
     450msgstr ""
     451
     452#: free/templates/dashboard.php:390
     453msgid "Delete"
     454msgstr ""
     455
     456#: free/backupino.php:1
     457msgid "Delete backup"
     458msgstr ""
     459
     460#: free/templates/dashboard.php:389
     461msgid "Delete backup package"
     462msgstr ""
     463
     464#: free/src/Admin/Admin.php:112
     465msgid "Delete this package permanently?"
     466msgstr ""
     467
     468#: free/backupino.php:1
     469msgid "Description of the plugin"
     470msgstr ""
     471
     472#: free/templates/dashboard.php:115
     473msgid "Destination"
     474msgstr ""
     475
     476#: free/backupino.php:1
     477msgid "Diagnostic information about active server extensions and write permissions."
     478msgstr ""
     479
     480#: free/templates/settings.php:390
     481msgid "Direct HTTP access to backup package URLs is NOT guaranteed to be blocked on Nginx until your server administrator adds the deny rule below inside your Nginx server { } block and reloads Nginx. Merely viewing this rule in the admin panel does not activate it."
     482msgstr ""
     483
     484#: free/templates/dashboard.php:89
     485msgid "Direct link that always serves the newest completed backup. Requires administrator login before download."
     486msgstr ""
     487
     488#: free/backupino.php:1
     489msgid "Disabled"
     490msgstr ""
     491
     492#: free/backupino.php:1
     493msgid "Download"
     494msgstr ""
     495
     496#: free/backupino.php:1
     497msgid "Download (sign in as an administrator):"
     498msgstr ""
     499
     500#: free/templates/dashboard.php:367
     501msgid "Download Archive"
     502msgstr ""
     503
     504#: free/templates/dashboard.php:366
     505#: free/templates/dashboard.php:440
     506msgid "Download Archive (.zip)"
     507msgstr ""
     508
     509#: free/src/Download/PublicDownload.php:297
     510msgid "Download Archive + Installer (Both)"
     511msgstr ""
     512
     513#: free/templates/dashboard.php:382
     514msgid "Download Archive and Installer simultaneously"
     515msgstr ""
     516
     517#: free/src/Download/PublicDownload.php:301
     518msgid "Download Backup Archive (.zip)"
     519msgstr ""
     520
     521#: free/src/Download/PublicDownload.php:267
     522#: free/src/Download/PublicDownload.php:276
     523msgid "Download Backup Package"
     524msgstr ""
     525
     526#: free/templates/dashboard.php:383
     527msgid "Download Both"
     528msgstr ""
     529
     530#: free/templates/dashboard.php:374
     531msgid "Download Installer"
     532msgstr ""
     533
     534#: free/templates/dashboard.php:443
     535msgid "Download Installer (.php)"
     536msgstr ""
     537
     538#: free/src/Download/PublicDownload.php:305
     539#: free/templates/dashboard.php:373
     540msgid "Download Installer (installer.php)"
     541msgstr ""
     542
     543#: free/templates/settings.php:546
     544msgid "Download Link"
     545msgstr ""
     546
     547#: free/backupino.php:1
     548msgid "Download ZIP"
     549msgstr ""
     550
     551#: free/templates/dashboard.php:186
     552msgid "Dumps all WordPress database tables into pure standard SQL without relying on mysqldump."
     553msgstr ""
     554
     555#: free/templates/dashboard.php:153
     556msgid "Each backup includes installer.php alongside the archive zip. You can copy both files to an empty domain or localhost and run installer.php in your browser to restore the entire website in 3 steps without pre-installing WordPress."
     557msgstr ""
     558
     559#: free/templates/settings.php:490
     560msgid "Enable Bale"
     561msgstr ""
     562
     563#: free/templates/settings.php:449
     564msgid "Enable Telegram"
     565msgstr ""
     566
     567#: free/templates/settings.php:181
     568msgid "Enabled"
     569msgstr ""
     570
     571#: free/templates/settings.php:615
     572msgid "Enables recurring background backup jobs using WordPress built-in WP-Cron scheduler."
     573msgstr ""
     574
     575#: free/templates/settings.php:201
     576msgid "Encrypted"
     577msgstr ""
     578
     579#: free/templates/settings.php:111
     580msgid "Environment"
     581msgstr ""
     582
     583#: free/templates/dashboard.php:169
     584msgid "Everything is packed into one archive plus a standalone installer that rebuilds the site on any empty server."
     585msgstr ""
     586
     587#: free/templates/settings.php:302
     588msgid "Examples: wp-content/uploads/2022/, *.mp4, node_modules/. Cache and backup folders are always skipped automatically."
     589msgstr ""
     590
     591#: free/backupino.php:1
     592msgid "Examples: wp-content/uploads/2022/, *.mp4, node_modules/. Cache and backup folders are always skipped."
     593msgstr ""
     594
     595#: free/templates/settings.php:297
     596msgid "Excluded paths and patterns (one per line)"
     597msgstr ""
     598
     599#: free/src/Storage/LocalStorage.php:75
     600msgid "Executable files cannot be stored in backup storage."
     601msgstr ""
     602
     603#: free/templates/dashboard.php:450
     604msgid "Execution Log"
     605msgstr ""
     606
     607#: free/templates/settings.php:171
     608msgid "Execution Timeout"
     609msgstr ""
     610
     611#: free/src/Jobs/JobStatus.php:60
     612msgid "Failed"
     613msgstr ""
     614
     615#: free/src/Download/PublicDownload.php:285
     616msgid "File Size"
     617msgstr ""
     618
     619#: free/src/Backup/Stages/FilesStage.php:77
     620msgid "File archiving disabled."
     621msgstr ""
     622
     623#: free/src/Backup/ZipArchiveWriter.php:99
     624msgid "File is not readable: %s"
     625msgstr ""
     626
     627#: free/templates/dashboard.php:241
     628msgid "Files"
     629msgstr ""
     630
     631#: free/templates/settings.php:310
     632msgid "Files exceeding this size threshold will be skipped to keep backups fast and reliable. Enter 0 for no limit."
     633msgstr ""
     634
     635#: free/templates/settings.php:318
     636msgid "Files packed per request"
     637msgstr ""
     638
     639#: free/src/Backup/Stages/FinalizeStage.php:43
     640msgid "Finalizing the package"
     641msgstr ""
     642
     643#: free/templates/settings.php:298
     644msgid "Folders or file patterns that will be excluded from the backup archive (e.g. wp-content/cache/, *.mp4)."
     645msgstr ""
     646
     647#: free/backupino.php:1
     648msgid "Free"
     649msgstr ""
     650
     651#: free/src/Installer/Env.php:90
     652msgid "Free disk space"
     653msgstr ""
     654
     655#: free/templates/settings.php:621
     656msgid "Frequency"
     657msgstr ""
     658
     659#: free/templates/settings.php:549
     660#: free/templates/settings.php:580
     661msgid "HTML formatting tags such as <b>bold</b> and <a href=\"...\">links</a> are supported."
     662msgstr ""
     663
     664#: free/backupino.php:1
     665msgid "Hide"
     666msgstr ""
     667
     668#: free/src/Download/PublicDownload.php:310
     669msgid "How to restore or migrate:"
     670msgstr ""
     671
     672#: free/backupino.php:1
     673msgid "In Free edition, monthly execution triggers on the 1st of each Persian/Gregorian month based on site language."
     674msgstr ""
     675
     676#: free/templates/settings.php:199
     677msgid "Inactive"
     678msgstr ""
     679
     680#: free/templates/dashboard.php:185
     681msgid "Include database"
     682msgstr ""
     683
     684#: free/templates/dashboard.php:180
     685msgid "Include files"
     686msgstr ""
     687
     688#: free/templates/dashboard.php:181
     689msgid "Includes WordPress core files, active themes, plugins, and uploads media library."
     690msgstr ""
     691
     692#: free/templates/dashboard.php:262
     693msgid "Initializing backup job…"
     694msgstr ""
     695
     696#: free/templates/dashboard.php:245
     697msgid "Installer"
     698msgstr ""
     699
     700#: free/src/Download/PublicDownload.php:140
     701msgid "Installer file not found."
     702msgstr ""
     703
     704#: free/templates/settings.php:655
     705msgid "Installer password (optional)"
     706msgstr ""
     707
     708#: free/src/Admin/DownloadHandler.php:56
     709msgid "Invalid file name."
     710msgstr ""
     711
     712#: free/backupino.php:1
     713msgid "Isolated, protected path used to safely store archive files away from public access:"
     714msgstr ""
     715
     716#: free/templates/dashboard.php:173
     717msgid "JavaScript is required to build backups."
     718msgstr ""
     719
     720#: free/templates/settings.php:633
     721msgid "Keep at most (backups)"
     722msgstr ""
     723
     724#: free/templates/dashboard.php:192
     725msgid "Label (optional)"
     726msgstr ""
     727
     728#: free/src/Admin/Admin.php:114
     729msgid "Link copied to the clipboard."
     730msgstr ""
     731
     732#: free/templates/dashboard.php:274
     733msgid "Live Activity Feed"
     734msgstr ""
     735
     736#: free/templates/settings.php:145
     737msgid "Live diagnostic health report of active server extensions, filesystem permissions, and system stability."
     738msgstr ""
     739
     740#: free/templates/dashboard.php:453
     741msgid "Loading logs…"
     742msgstr ""
     743
     744#: free/backupino.php:1
     745msgid "Loading…"
     746msgstr ""
     747
     748#: free/templates/settings.php:212
     749msgid "Local directory used to store backup archives. Guarded with .htaccess (Apache/LiteSpeed), web.config (IIS), and index.html (directory listing). On Nginx, direct HTTP access is NOT guaranteed to be blocked until a server-level deny rule is configured."
     750msgstr ""
     751
     752#: free/backupino.php:1
     753msgid "Local folder: %s"
     754msgstr ""
     755
     756#: free/templates/settings.php:403
     757msgid "Manual Nginx Rule Configuration Required"
     758msgstr ""
     759
     760#: free/templates/settings.php:634
     761msgid "Maximum number of recent backups to keep on disk. Older packages are automatically pruned to save space."
     762msgstr ""
     763
     764#: free/templates/dashboard.php:123
     765#: free/templates/settings.php:120
     766#: free/templates/settings.php:162
     767msgid "Memory Limit"
     768msgstr ""
     769
     770#: free/templates/dashboard.php:428
     771msgid "Message"
     772msgstr ""
     773
     774#: free/templates/settings.php:529
     775msgid "Message template sent to messengers when a backup finishes."
     776msgstr ""
     777
     778#: free/templates/settings.php:561
     779msgid "Message template sent to messengers when the site is restored using the installer."
     780msgstr ""
     781
     782#: free/backupino.php:1
     783msgid "Messenger"
     784msgstr ""
     785
     786#: free/backupino.php:1
     787msgid "Messenger Platform"
     788msgstr ""
     789
     790#: free/templates/settings.php:626
     791msgid "Monthly (first day of the month)"
     792msgstr ""
     793
     794#: free/templates/settings.php:622
     795msgid "Monthly execution triggers on the 1st of each Persian/Gregorian month based on site language."
     796msgstr ""
     797
     798#: free/src/Installer/Env.php:56
     799msgid "MySQL driver"
     800msgstr ""
     801
     802#: free/src/Core/Compatibility.php:66
     803msgid "Neither the Zip extension nor PclZip is available, so archives cannot be created."
     804msgstr ""
     805
     806#: free/backupino.php:1
     807msgid "New Administrator Account Created:"
     808msgstr ""
     809
     810#: free/templates/settings.php:575
     811msgid "New Site URL"
     812msgstr ""
     813
     814#: free/templates/settings.php:382
     815msgid "Nginx & Reverse Proxy Limitations:"
     816msgstr ""
     817
     818#: free/templates/dashboard.php:62
     819msgid "Nginx Server Configuration Note:"
     820msgstr ""
     821
     822#: free/templates/settings.php:366
     823msgid "Nginx Server Detected — Action Required to Block Direct Access:"
     824msgstr ""
     825
     826#: free/templates/settings.php:383
     827msgid "Nginx completely ignores .htaccess and web.config files. Because reverse proxies or front-end caches may sit in front of Apache or PHP-FPM, automated web server detection is best-effort and cannot be guaranteed in every architecture. Backupino cannot automatically modify or reload Nginx configuration files."
     828msgstr ""
     829
     830#: free/templates/settings.php:225
     831msgid "Nginx detected — manual server configuration required:"
     832msgstr ""
     833
     834#: free/templates/settings.php:367
     835msgid "Nginx does not enforce .htaccess or web.config rules, and index.html only conceals directory listings. Action is required by your server administrator to prevent direct HTTP downloads of backup files."
     836msgstr ""
     837
     838#: free/templates/settings.php:226
     839msgid "Nginx ignores .htaccess and web.config. Backupino cannot automatically alter or reload Nginx configuration. Direct HTTP downloads of package URLs are not guaranteed to be blocked until your server administrator adds the rule below inside your Nginx server { } block and reloads Nginx."
     840msgstr ""
     841
     842#: free/src/Core/Compatibility.php:108
     843msgid "Nginx web server detected: Nginx ignores .htaccess and web.config files, and index.html only hides directory listing. Direct HTTP access to backup files is NOT guaranteed to be blocked until your server administrator adds the server-level Nginx deny rule in Backupino -> Settings -> Storage Destination and reloads Nginx. Backupino cannot automatically alter or reload Nginx configuration."
     844msgstr ""
     845
     846#: free/templates/dashboard.php:312
     847msgid "No backups yet."
     848msgstr ""
     849
     850#: free/src/Notify/Notifier.php:251
     851msgid "No messenger is configured."
     852msgstr ""
     853
     854#: free/templates/settings.php:266
     855msgid "No recent log entries found."
     856msgstr ""
     857
     858#: free/src/Installer/Env.php:92
     859msgid "Not restricted / host managed"
     860msgstr ""
     861
     862#: free/backupino.php:1
     863msgid "Notifications"
     864msgstr ""
     865
     866#: free/backupino.php:1
     867msgid "Notifications are working. Backups will be announced here."
     868msgstr ""
     869
     870#: free/backupino.php:1
     871msgid "Numeric chat or channel ID where notifications should be posted."
     872msgstr ""
     873
     874#: free/templates/settings.php:165
     875#: free/templates/settings.php:174
     876msgid "OK"
     877msgstr ""
     878
     879#: free/src/Cron/Scheduler.php:69
     880msgid "Once monthly (first day of the month)"
     881msgstr ""
     882
     883#: free/backupino.php:1
     884msgid "Once weekly"
     885msgstr ""
     886
     887#: free/src/Download/PublicDownload.php:313
     888msgid "Open installer.php in your web browser and follow the on-screen steps."
     889msgstr ""
     890
     891#: free/templates/settings.php:198
     892msgid "OpenSSL"
     893msgstr ""
     894
     895#: free/src/Core/Compatibility.php:100
     896msgid "OpenSSL extension is missing: secure HTTPS communications will be unavailable."
     897msgstr ""
     898
     899#: free/backupino.php:1
     900msgid "OpenSSL is missing: S3 uploads that require HTTPS signatures and encrypted packages will be unavailable."
     901msgstr ""
     902
     903#: free/templates/dashboard.php:193
     904msgid "Optional note to identify why this backup was created (e.g. before updating WooCommerce)."
     905msgstr ""
     906
     907#: free/templates/dashboard.php:119
     908#: free/templates/settings.php:116
     909#: free/templates/settings.php:153
     910msgid "PHP Version"
     911msgstr ""
     912
     913#: free/src/Installer/Env.php:40
     914msgid "PHP extension: %s"
     915msgstr ""
     916
     917#: free/src/Core/Compatibility.php:84
     918msgid "PHP memory limit is %s. Backups will run in small chunks, but 128M or more is recommended."
     919msgstr ""
     920
     921#: free/src/Installer/Env.php:33
     922msgid "PHP version"
     923msgstr ""
     924
     925#: free/templates/dashboard.php:435
     926msgid "Package"
     927msgstr ""
     928
     929#: free/src/Backup/Stages/FinalizeStage.php:130
     930msgid "Package %1$s is ready (%2$s)."
     931msgstr ""
     932
     933#: free/src/Download/PublicDownload.php:281
     934msgid "Package Name"
     935msgstr ""
     936
     937#: free/templates/dashboard.php:303
     938msgid "Package name"
     939msgstr ""
     940
     941#: free/src/Storage/LocalStorage.php:119
     942msgid "Package not found."
     943msgstr ""
     944
     945#: free/backupino.php:1
     946msgid "Packages are stored on: %s"
     947msgstr ""
     948
     949#: free/templates/dashboard.php:249
     950msgid "Packaging"
     951msgstr ""
     952
     953#: free/src/Backup/Stages/FilesStage.php:155
     954msgid "Packed %1$s of %2$s files (%3$s skipped, %4$s)."
     955msgstr ""
     956
     957#: free/templates/settings.php:656
     958msgid "Password protecting installer.php when accessed via browser during migration or restoration."
     959msgstr ""
     960
     961#: free/templates/settings.php:181
     962msgid "PclZip fallback"
     963msgstr ""
     964
     965#: free/templates/dashboard.php:88
     966msgid "Permanent download link"
     967msgstr ""
     968
     969#: free/backupino.php:1
     970msgid "Plugin Name of the plugin"
     971msgstr ""
     972
     973#: free/templates/settings.php:692
     974msgid "Plugin updates are delivered securely through the official WordPress repository."
     975msgstr ""
     976
     977#: free/templates/settings.php:664
     978msgid "Preset target URL for search & replace when migrating to a known new domain."
     979msgstr ""
     980
     981#: free/templates/settings.php:340
     982msgid "Primary Destination Driver"
     983msgstr ""
     984
     985#: free/templates/settings.php:341
     986msgid "Primary storage destination for completed packages."
     987msgstr ""
     988
     989#: free/backupino.php:1
     990msgid "Primary storage destination for completed packages. In the Free edition, local protected storage is used."
     991msgstr ""
     992
     993#: free/templates/dashboard.php:302
     994#: free/templates/dashboard.php:420
     995msgid "Progress"
     996msgstr ""
     997
     998#: free/templates/settings.php:126
     999msgid "Protected"
     1000msgstr ""
     1001
     1002#: free/backupino.php:1
     1003msgid "Protected Directory Path"
     1004msgstr ""
     1005
     1006#: free/src/Jobs/JobStatus.php:54
     1007msgid "Queued"
     1008msgstr ""
     1009
     1010#: free/backupino.php:1
     1011msgid "Quick Navigation"
     1012msgstr ""
     1013
     1014#: free/templates/dashboard.php:275
     1015msgid "RUNNING"
     1016msgstr ""
     1017
     1018#: free/templates/settings.php:183
     1019msgid "Ready"
     1020msgstr ""
     1021
     1022#: free/templates/dashboard.php:278
     1023msgid "Ready to start backup..."
     1024msgstr ""
     1025
     1026#: free/templates/settings.php:680
     1027msgid "Receive critical security notices, product updates, and roadmap announcements (opt-in)."
     1028msgstr ""
     1029
     1030#: free/templates/dashboard.php:294
     1031msgid "Recent backups"
     1032msgstr ""
     1033
     1034#: free/templates/settings.php:32
     1035#: free/templates/settings.php:606
     1036msgid "Recurring Schedule"
     1037msgstr ""
     1038
     1039#: free/templates/settings.php:248
     1040msgid "Refresh"
     1041msgstr ""
     1042
     1043#: free/templates/dashboard.php:67
     1044msgid "Required Nginx server configuration (add inside your server { } block and reload Nginx):"
     1045msgstr ""
     1046
     1047#: free/templates/settings.php:577
     1048msgid "Restoration Date"
     1049msgstr ""
     1050
     1051#: free/templates/settings.php:558
     1052msgid "Restoration Message Template"
     1053msgstr ""
     1054
     1055#: free/templates/settings.php:218
     1056msgid "Run Storage Write Test"
     1057msgstr ""
     1058
     1059#: free/templates/settings.php:614
     1060msgid "Run automatic backups"
     1061msgstr ""
     1062
     1063#: free/src/Jobs/JobStatus.php:56
     1064msgid "Running"
     1065msgstr ""
     1066
     1067#: free/templates/settings.php:703
     1068msgid "Save settings"
     1069msgstr ""
     1070
     1071#: free/src/Backup/Stages/ScanStage.php:39
     1072msgid "Scanning files"
     1073msgstr ""
     1074
     1075#: free/backupino.php:1
     1076msgid "Schedule"
     1077msgstr ""
     1078
     1079#: free/src/Cron/Scheduler.php:115
     1080msgid "Scheduled backup"
     1081msgstr ""
     1082
     1083#: free/src/Backup/Stages/FinalizeStage.php:78
     1084msgid "Sealing the archive…"
     1085msgstr ""
     1086
     1087#: free/backupino.php:1
     1088msgid "Select which messaging platform to send backup completion or failure alerts to."
     1089msgstr ""
     1090
     1091#: free/backupino.php:1
     1092msgid "Send test message"
     1093msgstr ""
     1094
     1095#: free/templates/settings.php:387
     1096msgid "Server Administrator Nginx Configuration"
     1097msgstr ""
     1098
     1099#: free/src/Admin/Admin.php:67
     1100#: free/src/Admin/Admin.php:68
     1101#: free/src/Admin/Admin.php:160
     1102#: free/templates/dashboard.php:47
     1103#: free/templates/settings.php:77
    571104msgid "Settings"
    581105msgstr ""
    591106
    60 #: src/Admin/Admin.php:109
     1107#: free/templates/settings.php:90
     1108msgid "Settings Navigation"
     1109msgstr ""
     1110
     1111#: free/src/Admin/Admin.php:113
     1112msgid "Settings saved."
     1113msgstr ""
     1114
     1115#: free/backupino.php:1
     1116msgid "Show"
     1117msgstr ""
     1118
     1119#: free/templates/settings.php:542
     1120#: free/templates/settings.php:574
     1121msgid "Site Name"
     1122msgstr ""
     1123
     1124#: free/templates/dashboard.php:304
     1125#: free/templates/dashboard.php:436
     1126msgid "Size"
     1127msgstr ""
     1128
     1129#: free/backupino.php:1
     1130msgid "Size: %s"
     1131msgstr ""
     1132
     1133#: free/templates/settings.php:309
     1134msgid "Skip files larger than (MB, 0 = no limit)"
     1135msgstr ""
     1136
     1137#: free/src/Installer/Extractor.php:136
     1138msgid "Skipped unsafe entry: %s"
     1139msgstr ""
     1140
     1141#: free/templates/settings.php:36
     1142#: free/templates/settings.php:646
     1143msgid "Standalone Installer"
     1144msgstr ""
     1145
     1146#: free/templates/dashboard.php:149
     1147msgid "Standalone Restore"
     1148msgstr ""
     1149
     1150#: free/src/Admin/Admin.php:109
    611151msgid "Starting…"
    621152msgstr ""
    631153
    64 #: src/Admin/Admin.php:110
     1154#: free/templates/dashboard.php:301
     1155#: free/templates/dashboard.php:416
     1156msgid "Status"
     1157msgstr ""
     1158
     1159#: free/backupino.php:1
     1160msgid "Storage"
     1161msgstr ""
     1162
     1163#: free/templates/dashboard.php:110
     1164msgid "Storage & Environment"
     1165msgstr ""
     1166
     1167#: free/templates/settings.php:24
     1168#: free/templates/settings.php:332
     1169msgid "Storage Destination"
     1170msgstr ""
     1171
     1172#: free/templates/settings.php:355
     1173msgid "Storage Directory Path"
     1174msgstr ""
     1175
     1176#: free/templates/settings.php:124
     1177msgid "Storage Status"
     1178msgstr ""
     1179
     1180#: free/templates/dashboard.php:133
     1181msgid "Storage folder:"
     1182msgstr ""
     1183
     1184#: free/src/Admin/RestController.php:455
     1185msgid "Storage is writable."
     1186msgstr ""
     1187
     1188#: free/templates/settings.php:192
     1189msgid "Streaming"
     1190msgstr ""
     1191
     1192#: free/templates/settings.php:244
     1193msgid "System & Activity Log Stream"
     1194msgstr ""
     1195
     1196#: free/templates/settings.php:258
     1197msgid "System Activity Log (Last 100 entries)"
     1198msgstr ""
     1199
     1200#: free/templates/settings.php:40
     1201msgid "System Status"
     1202msgstr ""
     1203
     1204#: free/templates/settings.php:141
     1205msgid "System Status & Diagnostics"
     1206msgstr ""
     1207
     1208#: free/backupino.php:1
     1209msgid "System status"
     1210msgstr ""
     1211
     1212#: free/templates/settings.php:417
     1213msgid "Target filesystem path: %s"
     1214msgstr ""
     1215
     1216#: free/src/Notify/ChannelFactory.php:36
     1217msgid "Telegram"
     1218msgstr ""
     1219
     1220#: free/templates/settings.php:455
     1221msgid "Telegram Bot Token"
     1222msgstr ""
     1223
     1224#: free/templates/settings.php:464
     1225msgid "Telegram Chat ID"
     1226msgstr ""
     1227
     1228#: free/templates/settings.php:445
     1229msgid "Telegram Notification"
     1230msgstr ""
     1231
     1232#: free/templates/settings.php:465
     1233msgid "Telegram numeric chat or channel ID."
     1234msgstr ""
     1235
     1236#: free/templates/settings.php:516
     1237msgid "Test Bale"
     1238msgstr ""
     1239
     1240#: free/templates/settings.php:475
     1241msgid "Test Telegram"
     1242msgstr ""
     1243
     1244#: free/src/Admin/Admin.php:115
     1245msgid "Test message sent."
     1246msgstr ""
     1247
     1248#: free/templates/dashboard.php:139
     1249msgid "Test storage"
     1250msgstr ""
     1251
     1252#: free/src/Core/Compatibility.php:59
     1253msgid "The PHP extension \"%s\" is required but not loaded."
     1254msgstr ""
     1255
     1256#: free/src/Backup/Stages/DatabaseStage.php:77
     1257msgid "The SQL dump file could not be opened."
     1258msgstr ""
     1259
     1260#: free/src/Installer/Extractor.php:74
     1261msgid "The Zip extension is not available on this server."
     1262msgstr ""
     1263
     1264#: free/src/Backup/ZipArchiveWriter.php:60
     1265msgid "The Zip extension is not available."
     1266msgstr ""
     1267
     1268#: free/src/Installer/Extractor.php:88
     1269msgid "The archive cannot be opened. Is it complete?"
     1270msgstr ""
     1271
     1272#: free/src/Backup/ZipArchiveWriter.php:182
     1273msgid "The archive could not be finalized (%s)."
     1274msgstr ""
     1275
     1276#: free/src/Backup/ZipArchiveWriter.php:182
     1277msgid "The archive could not be finalized."
     1278msgstr ""
     1279
     1280#: free/src/Backup/Stages/FinalizeStage.php:85
     1281msgid "The archive could not be hashed."
     1282msgstr ""
     1283
     1284#: free/src/Installer/Extractor.php:80
     1285msgid "The archive file is missing."
     1286msgstr ""
     1287
     1288#: free/src/Backup/ZipArchiveWriter.php:89
     1289#: free/src/Backup/ZipArchiveWriter.php:132
     1290msgid "The archive is not open."
     1291msgstr ""
     1292
     1293#: free/templates/dashboard.php:285
     1294msgid "The backup process is running in the background. Please keep this browser window open until the operation finishes completely."
     1295msgstr ""
     1296
     1297#: free/templates/settings.php:410
     1298msgid "The backup storage directory is located outside standard web root or uses a custom path mapping. Your server administrator must manually configure an Nginx rule denying direct access based on your web server configuration."
     1299msgstr ""
     1300
     1301#: free/src/Notify/BotApi.php:191
     1302msgid "The bot token or chat id is missing."
     1303msgstr ""
     1304
     1305#: free/src/Installer/ConnectionManager.php:74
     1306msgid "The database could not be created: %s"
     1307msgstr ""
     1308
     1309#: free/templates/settings.php:232
     1310msgid "The exact Nginx location block cannot be determined automatically (e.g. external CDN or custom mapping). Please visit Backupino -> Settings -> Storage Destination to view manual configuration guidance."
     1311msgstr ""
     1312
     1313#: free/backupino.php:1
     1314msgid "The installer file could not be generated."
     1315msgstr ""
     1316
     1317#: free/src/Admin/Admin.php:111
     1318msgid "The job failed."
     1319msgstr ""
     1320
     1321#: free/src/Notify/BotApi.php:251
     1322msgid "The messenger answered with HTTP %d."
     1323msgstr ""
     1324
     1325#: free/src/Notify/BotApi.php:259
     1326msgid "The messenger rejected the message."
     1327msgstr ""
     1328
     1329#: free/src/Backup/Stages/FinalizeStage.php:99
     1330msgid "The package metadata could not be generated."
     1331msgstr ""
     1332
     1333#: free/src/Support/Fs.php:281
     1334msgid "The requested file does not exist."
     1335msgstr ""
     1336
     1337#: free/templates/dashboard.php:72
     1338msgid "The storage path cannot be resolved to an automatic Nginx location (for example, due to an external CDN, custom domain, or path outside webroot). Please see Backupino -> Settings -> Storage Destination to manually determine the rule for your server."
     1339msgstr ""
     1340
     1341#: free/src/Download/PublicDownload.php:101
     1342msgid "There is no backup ready to download yet."
     1343msgstr ""
     1344
     1345#: free/src/Notify/BotApi.php:197
     1346msgid "There is nothing to send."
     1347msgstr ""
     1348
     1349#: free/src/Download/PublicDownload.php:93
     1350msgid "This download link is not valid."
     1351msgstr ""
     1352
     1353#: free/templates/dashboard.php:93
     1354msgid "This link always points at the newest backup. It never expires, but the visitor must be signed in as an administrator before the download starts."
     1355msgstr ""
     1356
     1357#: free/backupino.php:1
     1358msgid "This location contains an .htaccess file blocking direct HTTP requests and indexing for maximum security."
     1359msgstr ""
     1360
     1361#: free/src/Admin/DownloadHandler.php:77
     1362#: free/src/Admin/DownloadHandler.php:81
     1363msgid "This package no longer exists on the server."
     1364msgstr ""
     1365
     1366#: free/src/Storage/LocalStorage.php:55
     1367msgid "This server"
     1368msgstr ""
     1369
     1370#: free/templates/dashboard.php:127
     1371msgid "Time Limit"
     1372msgstr ""
     1373
     1374#: free/src/Download/PublicDownload.php:65
     1375msgid "Too Many Requests"
     1376msgstr ""
     1377
     1378#: free/src/Download/PublicDownload.php:64
     1379msgid "Too many failed download attempts. Please try again in 10 minutes."
     1380msgstr ""
     1381
     1382#: free/src/Jobs/JobRunner.php:172
     1383msgid "Unknown pipeline stage."
     1384msgstr ""
     1385
     1386#: free/backupino.php:1
     1387msgid "Update Now"
     1388msgstr ""
     1389
     1390#: free/backupino.php:1
     1391msgid "Updates & Community"
     1392msgstr ""
     1393
     1394#: free/templates/settings.php:44
     1395#: free/templates/settings.php:676
     1396msgid "Updates & Privacy"
     1397msgstr ""
     1398
     1399#: free/src/Download/PublicDownload.php:312
     1400msgid "Upload both the .zip archive and installer.php into an empty directory on your destination server."
     1401msgstr ""
     1402
     1403#: free/src/Backup/Stages/FinalizeStage.php:260
     1404msgid "Upload failed: %s"
     1405msgstr ""
     1406
     1407#: free/src/Download/PublicDownload.php:274
     1408msgid "Verified Backup Package"
     1409msgstr ""
     1410
     1411#: free/backupino.php:1
     1412msgid "View Release Notes"
     1413msgstr ""
     1414
     1415#: free/templates/settings.php:684
     1416msgid "We respect your privacy. No telemetry or personal data is collected or sent without your explicit consent."
     1417msgstr ""
     1418
     1419#: free/templates/settings.php:376
     1420msgid "Web Server Direct Access Protection & Nginx Guidance"
     1421msgstr ""
     1422
     1423#: free/src/Admin/Admin.php:110
    651424msgid "Working…"
    661425msgstr ""
    671426
    68 #: src/Admin/Admin.php:111
    69 msgid "The job failed."
    70 msgstr ""
    71 
    72 #: src/Admin/Admin.php:112
    73 msgid "Delete this package permanently?"
    74 msgstr ""
    75 
    76 #: src/Admin/Admin.php:113
    77 msgid "Settings saved."
    78 msgstr ""
    79 
    80 #: src/Admin/Admin.php:114
    81 msgid "Link copied to the clipboard."
    82 msgstr ""
    83 
    84 #: src/Admin/Admin.php:115
    85 msgid "Test message sent."
    86 msgstr ""
    87 
    88 #: src/Admin/Admin.php:116
    89 msgid "Backup Job"
    90 msgstr ""
    91 
    92 #: src/Admin/Admin.php:117
    93 msgid "Cancel the current backup job?"
    94 msgstr ""
    95 
    96 #: src/Admin/Admin.php:118
    97 msgid "Backup cancelled."
    98 msgstr ""
    99 
    100 #: src/Admin/Admin.php:131
    101 #: src/Admin/Admin.php:144
     1427#: free/templates/settings.php:126
     1428msgid "Writable"
     1429msgstr ""
     1430
     1431#: free/src/Installer/Env.php:62
     1432msgid "Writable directory"
     1433msgstr ""
     1434
     1435#: free/src/Admin/DownloadHandler.php:50
     1436msgid "You are not allowed to download backups."
     1437msgstr ""
     1438
     1439#: free/src/Admin/Admin.php:131
     1440#: free/src/Admin/Admin.php:144
    1021441msgid "You are not allowed to manage backups."
    1031442msgstr ""
    1041443
    105 #: src/Admin/Admin.php:185
    106 msgid "Backupino — Site Migration Completed!"
    107 msgstr ""
    108 
    109 #: src/Admin/Admin.php:187
     1444#: free/backupino.php:1
     1445msgid "You do not have permission to check for updates."
     1446msgstr ""
     1447
     1448#: free/templates/settings.php:408
     1449msgid "Your WordPress uploads directory uses an external CDN or separate domain. The exact public Nginx location cannot be determined automatically. Your server administrator must manually create an Nginx location block matching your origin server URL mapping."
     1450msgstr ""
     1451
     1452#: free/src/Admin/Admin.php:187
    1101453msgid "Your website has been successfully restored and migrated to this location. Installer files and temporary data have been cleaned up."
    1111454msgstr ""
    1121455
    113 #: src/Admin/DownloadHandler.php:50
    114 msgid "You are not allowed to download backups."
    115 msgstr ""
    116 
    117 #: src/Admin/DownloadHandler.php:56
    118 msgid "Invalid file name."
    119 msgstr ""
    120 
    121 #: src/Admin/DownloadHandler.php:77
    122 #: src/Admin/DownloadHandler.php:81
    123 msgid "This package no longer exists on the server."
    124 msgstr ""
    125 
    126 #: src/Admin/RestController.php:237
    127 msgid "Could not create backup job in database."
    128 msgstr ""
    129 
    130 #: src/Admin/RestController.php:455
    131 msgid "Storage is writable."
    132 msgstr ""
    133 
    134 #: src/Backup/Stages/DatabaseStage.php:40
    135 msgid "Copying the database"
    136 msgstr ""
    137 
    138 #: src/Backup/Stages/DatabaseStage.php:61
    139 msgid "Database dump disabled."
    140 msgstr ""
    141 
    142 #: src/Backup/Stages/DatabaseStage.php:77
    143 msgid "The SQL dump file could not be opened."
    144 msgstr ""
    145 
    146 #. translators: 1: number of rows, 2: number of tables, 3: dumped size.
    147 #: src/Backup/Stages/DatabaseStage.php:99
    148 #, php-format
    149 msgid "%1$s rows from %2$s tables (%3$s)."
    150 msgstr ""
    151 
    152 #: src/Backup/Stages/FilesStage.php:40
    153 msgid "Archiving files"
    154 msgstr ""
    155 
    156 #: src/Backup/Stages/FilesStage.php:77
    157 msgid "File archiving disabled."
    158 msgstr ""
    159 
    160 #. translators: 1: packed files, 2: total files, 3: skipped files, 4: archive size.
    161 #: src/Backup/Stages/FilesStage.php:155
    162 #, php-format
    163 msgid "Packed %1$s of %2$s files (%3$s skipped, %4$s)."
    164 msgstr ""
    165 
    166 #: src/Backup/Stages/FinalizeStage.php:43
    167 msgid "Finalizing the package"
    168 msgstr ""
    169 
    170 #: src/Backup/Stages/FinalizeStage.php:78
    171 msgid "Sealing the archive…"
    172 msgstr ""
    173 
    174 #: src/Backup/Stages/FinalizeStage.php:85
    175 msgid "The archive could not be hashed."
    176 msgstr ""
    177 
    178 #: src/Backup/Stages/FinalizeStage.php:99
    179 msgid "The package metadata could not be generated."
    180 msgstr ""
    181 
    182 #. translators: 1: package name, 2: package size.
    183 #: src/Backup/Stages/FinalizeStage.php:130
    184 #, php-format
    185 msgid "Package %1$s is ready (%2$s)."
    186 msgstr ""
    187 
    188 #. translators: %s: storage error.
    189 #: src/Backup/Stages/FinalizeStage.php:260
    190 #, php-format
    191 msgid "Upload failed: %s"
    192 msgstr ""
    193 
    194 #: src/Backup/Stages/ScanStage.php:39
    195 msgid "Scanning files"
    196 msgstr ""
    197 
    198 #. translators: 1: number of files, 2: total size.
    199 #: src/Backup/Stages/ScanStage.php:86
    200 #, php-format
    201 msgid "%1$s files found (%2$s)."
    202 msgstr ""
    203 
    204 #: src/Backup/ZipArchiveWriter.php:60
    205 msgid "The Zip extension is not available."
    206 msgstr ""
    207 
    208 #. translators: %d: ZipArchive error code.
    209 #: src/Backup/ZipArchiveWriter.php:73
    210 #, php-format
    211 msgid "Could not open the archive (error %d)."
    212 msgstr ""
    213 
    214 #: src/Backup/ZipArchiveWriter.php:89
    215 #: src/Backup/ZipArchiveWriter.php:132
    216 msgid "The archive is not open."
    217 msgstr ""
    218 
    219 #. translators: %s: file path.
    220 #: src/Backup/ZipArchiveWriter.php:99
    221 #, php-format
    222 msgid "File is not readable: %s"
    223 msgstr ""
    224 
    225 #. translators: %s: file path.
    226 #: src/Backup/ZipArchiveWriter.php:109
    227 #, php-format
    228 msgid "Could not add file to archive: %s"
    229 msgstr ""
    230 
    231 #. translators: %s: status description.
    232 #: src/Backup/ZipArchiveWriter.php:182
    233 #, php-format
    234 msgid "The archive could not be finalized (%s)."
    235 msgstr ""
    236 
    237 #. translators: %s: status description.
    238 #: src/Backup/ZipArchiveWriter.php:182
    239 msgid "The archive could not be finalized."
    240 msgstr ""
    241 
    242 #: src/Core/Activator.php:45
    243 #: src/Cron/Scheduler.php:62
    244 msgid "Backupino: every minute"
    245 msgstr ""
    246 
    247 #. translators: 1: required PHP version, 2: current PHP version.
    248 #: src/Core/Compatibility.php:49
    249 #, php-format
    250 msgid "Backupino requires PHP %1$s or newer. This server runs PHP %2$s."
    251 msgstr ""
    252 
    253 #. translators: %s: PHP extension name.
    254 #: src/Core/Compatibility.php:59
    255 #, php-format
    256 msgid "The PHP extension \"%s\" is required but not loaded."
    257 msgstr ""
    258 
    259 #: src/Core/Compatibility.php:66
    260 msgid "Neither the Zip extension nor PclZip is available, so archives cannot be created."
    261 msgstr ""
    262 
    263 #. translators: %s: current memory limit.
    264 #: src/Core/Compatibility.php:84
    265 #, php-format
    266 msgid "PHP memory limit is %s. Backups will run in small chunks, but 128M or more is recommended."
    267 msgstr ""
    268 
    269 #. translators: %d: seconds.
    270 #: src/Core/Compatibility.php:94
    271 #, php-format
     1456#: free/templates/settings.php:180
     1457msgid "ZipArchive"
     1458msgstr ""
     1459
     1460#: free/src/Installer/Env.php:52
     1461msgid "ZipArchive available"
     1462msgstr ""
     1463
     1464#: free/src/Installer/Env.php:52
     1465msgid "ZipArchive missing"
     1466msgstr ""
     1467
     1468#: free/src/Notify/Notifier.php:185
     1469msgid "database only"
     1470msgstr ""
     1471
     1472#: free/src/Notify/Notifier.php:183
     1473msgid "files and database"
     1474msgstr ""
     1475
     1476#: free/src/Notify/Notifier.php:187
     1477msgid "files only"
     1478msgstr ""
     1479
     1480#: free/src/Installer/Env.php:42
     1481msgid "loaded"
     1482msgstr ""
     1483
     1484#: free/src/Core/Compatibility.php:94
    2721485msgid "max_execution_time is %d seconds. Long steps will be split automatically."
    2731486msgstr ""
    2741487
    275 #: src/Core/Compatibility.php:100
    276 msgid "OpenSSL extension is missing: secure HTTPS communications will be unavailable."
    277 msgstr ""
    278 
    279 #: src/Core/Compatibility.php:104
     1488#: free/src/Core/Compatibility.php:104
    2801489msgid "mbstring is missing: multibyte site titles may be truncated on URL replacement."
    2811490msgstr ""
    2821491
    283 #: src/Cron/Scheduler.php:69
    284 msgid "Once monthly (first day of the month)"
    285 msgstr ""
    286 
    287 #: src/Cron/Scheduler.php:115
    288 msgid "Scheduled backup"
    289 msgstr ""
    290 
    291 #: src/Download/PublicDownload.php:64
    292 msgid "Too many failed download attempts. Please try again in 10 minutes."
    293 msgstr ""
    294 
    295 #: src/Download/PublicDownload.php:65
    296 msgid "Too Many Requests"
    297 msgstr ""
    298 
    299 #: src/Download/PublicDownload.php:93
    300 msgid "This download link is not valid."
    301 msgstr ""
    302 
    303 #: src/Download/PublicDownload.php:101
    304 msgid "There is no backup ready to download yet."
    305 msgstr ""
    306 
    307 #: src/Download/PublicDownload.php:140
    308 msgid "Installer file not found."
    309 msgstr ""
    310 
    311 #: src/Download/PublicDownload.php:267
    312 #: src/Download/PublicDownload.php:276
    313 msgid "Download Backup Package"
    314 msgstr ""
    315 
    316 #: src/Download/PublicDownload.php:274
    317 msgid "Verified Backup Package"
    318 msgstr ""
    319 
    320 #: src/Download/PublicDownload.php:281
    321 msgid "Package Name"
    322 msgstr ""
    323 
    324 #: src/Download/PublicDownload.php:285
    325 msgid "File Size"
    326 msgstr ""
    327 
    328 #: src/Download/PublicDownload.php:289
    329 msgid "Created Date"
    330 msgstr ""
    331 
    332 #: src/Download/PublicDownload.php:297
    333 msgid "Download Archive + Installer (Both)"
    334 msgstr ""
    335 
    336 #: src/Download/PublicDownload.php:301
    337 msgid "Download Backup Archive (.zip)"
    338 msgstr ""
    339 
    340 #: src/Download/PublicDownload.php:305
    341 #: templates/dashboard.php:356
    342 msgid "Download Installer (installer.php)"
    343 msgstr ""
    344 
    345 #: src/Download/PublicDownload.php:310
    346 msgid "How to restore or migrate:"
    347 msgstr ""
    348 
    349 #: src/Download/PublicDownload.php:312
    350 msgid "Upload both the .zip archive and installer.php into an empty directory on your destination server."
    351 msgstr ""
    352 
    353 #: src/Download/PublicDownload.php:313
    354 msgid "Open installer.php in your web browser and follow the on-screen steps."
    355 msgstr ""
    356 
    357 #. translators: %s: driver error.
    358 #: src/Installer/ConnectionManager.php:74
    359 #, php-format
    360 msgid "The database could not be created: %s"
    361 msgstr ""
    362 
    363 #: src/Installer/Env.php:33
    364 msgid "PHP version"
    365 msgstr ""
    366 
    367 #. translators: %s: extension name.
    368 #: src/Installer/Env.php:40
    369 #, php-format
    370 msgid "PHP extension: %s"
    371 msgstr ""
    372 
    373 #: src/Installer/Env.php:42
    374 msgid "loaded"
    375 msgstr ""
    376 
    377 #: src/Installer/Env.php:42
     1492#: free/src/Installer/Env.php:42
    3781493msgid "missing"
    3791494msgstr ""
    3801495
    381 #: src/Installer/Env.php:50
    382 msgid "Archive support"
    383 msgstr ""
    384 
    385 #: src/Installer/Env.php:52
    386 msgid "ZipArchive available"
    387 msgstr ""
    388 
    389 #: src/Installer/Env.php:52
    390 msgid "ZipArchive missing"
    391 msgstr ""
    392 
    393 #: src/Installer/Env.php:56
    394 msgid "MySQL driver"
    395 msgstr ""
    396 
    397 #: src/Installer/Env.php:58
     1496#: free/src/Installer/Env.php:92
     1497msgid "needed"
     1498msgstr ""
     1499
     1500#: free/backupino.php:1
     1501msgid "none"
     1502msgstr ""
     1503
     1504#: free/src/Installer/Env.php:72
     1505msgid "not found: %s"
     1506msgstr ""
     1507
     1508#: free/src/Installer/Env.php:58
    3981509msgid "pdo_mysql missing"
    3991510msgstr ""
    4001511
    401 #: src/Installer/Env.php:62
    402 msgid "Writable directory"
    403 msgstr ""
    404 
    405 #: src/Installer/Env.php:70
    406 msgid "Archive file"
    407 msgstr ""
    408 
    409 #. translators: %s: file name.
    410 #: src/Installer/Env.php:72
    411 #, php-format
    412 msgid "not found: %s"
    413 msgstr ""
    414 
    415 #: src/Installer/Env.php:77
    416 msgid "Archive checksum"
    417 msgstr ""
    418 
    419 #: src/Installer/Env.php:79
     1512#: free/backupino.php:1
     1513msgid "unknown"
     1514msgstr ""
     1515
     1516#: free/src/Installer/Env.php:79
    4201517msgid "verified against the package manifest"
    4211518msgstr ""
    4221519
    423 #: src/Installer/Env.php:90
    424 msgid "Free disk space"
    425 msgstr ""
    426 
    427 #: src/Installer/Env.php:92
    428 msgid "Not restricted / host managed"
    429 msgstr ""
    430 
    431 #: src/Installer/Env.php:92
    432 msgid "needed"
    433 msgstr ""
    434 
    435 #: src/Installer/Extractor.php:74
    436 msgid "The Zip extension is not available on this server."
    437 msgstr ""
    438 
    439 #: src/Installer/Extractor.php:80
    440 msgid "The archive file is missing."
    441 msgstr ""
    442 
    443 #: src/Installer/Extractor.php:88
    444 msgid "The archive cannot be opened. Is it complete?"
    445 msgstr ""
    446 
    447 #. translators: %s: archive entry name.
    448 #: src/Installer/Extractor.php:136
    449 #, php-format
    450 msgid "Skipped unsafe entry: %s"
    451 msgstr ""
    452 
    453 #: src/Jobs/JobRunner.php:172
    454 msgid "Unknown pipeline stage."
    455 msgstr ""
    456 
    457 #: src/Jobs/JobRunner.php:308
    458 msgid "Cancelled by the user."
    459 msgstr ""
    460 
    461 #: src/Jobs/JobStatus.php:54
    462 msgid "Queued"
    463 msgstr ""
    464 
    465 #: src/Jobs/JobStatus.php:56
    466 msgid "Running"
    467 msgstr ""
    468 
    469 #: src/Jobs/JobStatus.php:58
    470 msgid "Completed"
    471 msgstr ""
    472 
    473 #: src/Jobs/JobStatus.php:60
    474 msgid "Failed"
    475 msgstr ""
    476 
    477 #: src/Jobs/JobStatus.php:62
    478 msgid "Cancelled"
    479 msgstr ""
    480 
    481 #: src/Notify/BotApi.php:191
    482 msgid "The bot token or chat id is missing."
    483 msgstr ""
    484 
    485 #: src/Notify/BotApi.php:197
    486 msgid "There is nothing to send."
    487 msgstr ""
    488 
    489 #. translators: %d: HTTP status code.
    490 #: src/Notify/BotApi.php:251
    491 #, php-format
    492 msgid "The messenger answered with HTTP %d."
    493 msgstr ""
    494 
    495 #: src/Notify/BotApi.php:259
    496 msgid "The messenger rejected the message."
    497 msgstr ""
    498 
    499 #: src/Notify/ChannelFactory.php:36
    500 msgid "Telegram"
    501 msgstr ""
    502 
    503 #: src/Notify/ChannelFactory.php:37
    504 msgid "Bale"
    505 msgstr ""
    506 
    507 #: src/Notify/Notifier.php:183
    508 msgid "files and database"
    509 msgstr ""
    510 
    511 #: src/Notify/Notifier.php:185
    512 msgid "database only"
    513 msgstr ""
    514 
    515 #: src/Notify/Notifier.php:187
    516 msgid "files only"
    517 msgstr ""
    518 
    519 #. translators: %s: messenger service name.
    520 #: src/Notify/Notifier.php:241
    521 #, php-format
    522 msgid "%s messenger is not enabled or not fully configured."
    523 msgstr ""
    524 
    525 #: src/Notify/Notifier.php:251
    526 msgid "No messenger is configured."
    527 msgstr ""
    528 
    529 #: src/Plugin.php:190
    530 msgid "Backupino cannot run on this server:"
    531 msgstr ""
    532 
    533 #: src/Storage/LocalStorage.php:55
    534 msgid "This server"
    535 msgstr ""
    536 
    537 #: src/Storage/LocalStorage.php:75
    538 msgid "Executable files cannot be stored in backup storage."
    539 msgstr ""
    540 
    541 #: src/Storage/LocalStorage.php:97
    542 msgid "Could not read the package file."
    543 msgstr ""
    544 
    545 #: src/Storage/LocalStorage.php:104
    546 msgid "Could not write the package file."
    547 msgstr ""
    548 
    549 #: src/Storage/LocalStorage.php:119
    550 msgid "Package not found."
    551 msgstr ""
    552 
    553 #: src/Support/Fs.php:281
    554 msgid "The requested file does not exist."
    555 msgstr ""
    556 
    557 #: templates/dashboard.php:40
    558 #: templates/settings.php:70
    559 msgid "Backupino Navigation"
    560 msgstr ""
    561 
    562 #: templates/dashboard.php:71
    563 msgid "Permanent download link"
    564 msgstr ""
    565 
    566 #: templates/dashboard.php:72
    567 msgid "Direct link that always serves the newest completed backup. Requires administrator login before download."
    568 msgstr ""
    569 
    570 #: templates/dashboard.php:76
    571 msgid "This link always points at the newest backup. It never expires, but the visitor must be signed in as an administrator before the download starts."
    572 msgstr ""
    573 
    574 #: templates/dashboard.php:82
    575 msgid "Copy link"
    576 msgstr ""
    577 
    578 #: templates/dashboard.php:93
    579 msgid "Storage & Environment"
    580 msgstr ""
    581 
    582 #: templates/dashboard.php:98
    583 msgid "Destination"
    584 msgstr ""
    585 
    586 #: templates/dashboard.php:102
    587 #: templates/settings.php:116
    588 #: templates/settings.php:153
    589 msgid "PHP Version"
    590 msgstr ""
    591 
    592 #: templates/dashboard.php:106
    593 #: templates/settings.php:120
    594 #: templates/settings.php:162
    595 msgid "Memory Limit"
    596 msgstr ""
    597 
    598 #: templates/dashboard.php:110
    599 msgid "Time Limit"
    600 msgstr ""
    601 
    602 #: templates/dashboard.php:116
    603 msgid "Storage folder:"
    604 msgstr ""
    605 
    606 #: templates/dashboard.php:122
    607 msgid "Test storage"
    608 msgstr ""
    609 
    610 #: templates/dashboard.php:132
    611 msgid "Standalone Restore"
    612 msgstr ""
    613 
    614 #: templates/dashboard.php:136
    615 msgid "Each backup includes installer.php alongside the archive zip. You can copy both files to an empty domain or localhost and run installer.php in your browser to restore the entire website in 3 steps without pre-installing WordPress."
    616 msgstr ""
    617 
    618 #: templates/dashboard.php:148
    619 msgid "Create a backup"
    620 msgstr ""
    621 
    622 #: templates/dashboard.php:152
    623 msgid "Everything is packed into one archive plus a standalone installer that rebuilds the site on any empty server."
    624 msgstr ""
    625 
    626 #: templates/dashboard.php:156
    627 msgid "JavaScript is required to build backups."
    628 msgstr ""
    629 
    630 #: templates/dashboard.php:163
    631 msgid "Include files"
    632 msgstr ""
    633 
    634 #: templates/dashboard.php:164
    635 msgid "Includes WordPress core files, active themes, plugins, and uploads media library."
    636 msgstr ""
    637 
    638 #: templates/dashboard.php:168
    639 msgid "Include database"
    640 msgstr ""
    641 
    642 #: templates/dashboard.php:169
    643 msgid "Dumps all WordPress database tables into pure standard SQL without relying on mysqldump."
    644 msgstr ""
    645 
    646 #: templates/dashboard.php:175
    647 msgid "Label (optional)"
    648 msgstr ""
    649 
    650 #: templates/dashboard.php:176
    651 msgid "Optional note to identify why this backup was created (e.g. before updating WooCommerce)."
    652 msgstr ""
    653 
    654 #: templates/dashboard.php:178
    655 msgid "Before updating plugins"
    656 msgstr ""
    657 
    658 #: templates/dashboard.php:184
    659 msgid "Create backup"
    660 msgstr ""
    661 
    662 #: templates/dashboard.php:201
    663 msgid "Backup in Progress"
    664 msgstr ""
    665 
    666 #: templates/dashboard.php:205
    667 msgid "Cancel backup job"
    668 msgstr ""
    669 
    670 #: templates/dashboard.php:207
    671 msgid "Cancel"
    672 msgstr ""
    673 
    674 #: templates/dashboard.php:216
    675 msgid "Cataloging"
    676 msgstr ""
    677 
    678 #: templates/dashboard.php:220
    679 msgid "Database"
    680 msgstr ""
    681 
    682 #: templates/dashboard.php:224
    683 msgid "Files"
    684 msgstr ""
    685 
    686 #: templates/dashboard.php:228
    687 msgid "Installer"
    688 msgstr ""
    689 
    690 #: templates/dashboard.php:232
    691 msgid "Packaging"
    692 msgstr ""
    693 
    694 #: templates/dashboard.php:245
    695 msgid "Initializing backup job…"
    696 msgstr ""
    697 
    698 #: templates/dashboard.php:257
    699 msgid "Live Activity Feed"
    700 msgstr ""
    701 
    702 #: templates/dashboard.php:258
    703 msgid "RUNNING"
    704 msgstr ""
    705 
    706 #: templates/dashboard.php:261
    707 msgid "Ready to start backup..."
    708 msgstr ""
    709 
    710 #: templates/dashboard.php:268
    711 msgid "The backup process is running in the background. Please keep this browser window open until the operation finishes completely."
    712 msgstr ""
    713 
    714 #: templates/dashboard.php:277
    715 msgid "Recent backups"
    716 msgstr ""
    717 
    718 #: templates/dashboard.php:283
    719 msgid "Created"
    720 msgstr ""
    721 
    722 #: templates/dashboard.php:284
    723 #: templates/dashboard.php:399
    724 msgid "Status"
    725 msgstr ""
    726 
    727 #: templates/dashboard.php:285
    728 #: templates/dashboard.php:403
    729 msgid "Progress"
    730 msgstr ""
    731 
    732 #: templates/dashboard.php:286
    733 msgid "Package name"
    734 msgstr ""
    735 
    736 #: templates/dashboard.php:287
    737 #: templates/dashboard.php:419
    738 msgid "Size"
    739 msgstr ""
    740 
    741 #: templates/dashboard.php:288
    742 msgid "Actions"
    743 msgstr ""
    744 
    745 #: templates/dashboard.php:295
    746 msgid "No backups yet."
    747 msgstr ""
    748 
    749 #: templates/dashboard.php:318
    750 msgid "Click to view log and details"
    751 msgstr ""
    752 
    753 #: templates/dashboard.php:349
    754 #: templates/dashboard.php:423
    755 msgid "Download Archive (.zip)"
    756 msgstr ""
    757 
    758 #: templates/dashboard.php:350
    759 msgid "Download Archive"
    760 msgstr ""
    761 
    762 #: templates/dashboard.php:357
    763 msgid "Download Installer"
    764 msgstr ""
    765 
    766 #: templates/dashboard.php:365
    767 msgid "Download Archive and Installer simultaneously"
    768 msgstr ""
    769 
    770 #: templates/dashboard.php:366
    771 msgid "Download Both"
    772 msgstr ""
    773 
    774 #: templates/dashboard.php:372
    775 msgid "Delete backup package"
    776 msgstr ""
    777 
    778 #: templates/dashboard.php:373
    779 msgid "Delete"
    780 msgstr ""
    781 
    782 #: templates/dashboard.php:392
    783 msgid "Backup Details & Log"
    784 msgstr ""
    785 
    786 #: templates/dashboard.php:394
    787 #: templates/dashboard.php:442
    788 msgid "Close"
    789 msgstr ""
    790 
    791 #: templates/dashboard.php:407
    792 msgid "Date"
    793 msgstr ""
    794 
    795 #: templates/dashboard.php:411
    796 msgid "Message"
    797 msgstr ""
    798 
    799 #: templates/dashboard.php:418
    800 msgid "Package"
    801 msgstr ""
    802 
    803 #: templates/dashboard.php:426
    804 msgid "Download Installer (.php)"
    805 msgstr ""
    806 
    807 #: templates/dashboard.php:433
    808 msgid "Execution Log"
    809 msgstr ""
    810 
    811 #: templates/dashboard.php:436
    812 msgid "Loading logs…"
    813 msgstr ""
    814 
    815 #: templates/settings.php:20
    816 #: templates/settings.php:274
    817 msgid "Archive & Exclusions"
    818 msgstr ""
    819 
    820 #: templates/settings.php:24
    821 #: templates/settings.php:317
    822 msgid "Storage Destination"
    823 msgstr ""
    824 
    825 #: templates/settings.php:28
    826 #: templates/settings.php:354
    827 msgid "Bot Notifications"
    828 msgstr ""
    829 
    830 #: templates/settings.php:32
    831 #: templates/settings.php:526
    832 msgid "Recurring Schedule"
    833 msgstr ""
    834 
    835 #: templates/settings.php:36
    836 #: templates/settings.php:566
    837 msgid "Standalone Installer"
    838 msgstr ""
    839 
    840 #: templates/settings.php:40
    841 msgid "System Status"
    842 msgstr ""
    843 
    844 #: templates/settings.php:44
    845 #: templates/settings.php:596
    846 msgid "Updates & Privacy"
    847 msgstr ""
    848 
    849 #: templates/settings.php:90
    850 msgid "Settings Navigation"
    851 msgstr ""
    852 
    853 #: templates/settings.php:111
    854 msgid "Environment"
    855 msgstr ""
    856 
    857 #: templates/settings.php:124
    858 msgid "Storage Status"
    859 msgstr ""
    860 
    861 #: templates/settings.php:126
    862 msgid "Writable"
    863 msgstr ""
    864 
    865 #: templates/settings.php:126
    866 msgid "Protected"
    867 msgstr ""
    868 
    869 #: templates/settings.php:141
    870 msgid "System Status & Diagnostics"
    871 msgstr ""
    872 
    873 #: templates/settings.php:145
    874 msgid "Live diagnostic health report of active server extensions, filesystem permissions, and system stability."
    875 msgstr ""
    876 
    877 #: templates/settings.php:156
    878 msgid "Compatible"
    879 msgstr ""
    880 
    881 #: templates/settings.php:165
    882 #: templates/settings.php:174
    883 msgid "OK"
    884 msgstr ""
    885 
    886 #: templates/settings.php:171
    887 msgid "Execution Timeout"
    888 msgstr ""
    889 
    890 #: templates/settings.php:180
    891 msgid "ZipArchive"
    892 msgstr ""
    893 
    894 #: templates/settings.php:181
    895 msgid "Enabled"
    896 msgstr ""
    897 
    898 #: templates/settings.php:181
    899 msgid "PclZip fallback"
    900 msgstr ""
    901 
    902 #: templates/settings.php:183
    903 msgid "Ready"
    904 msgstr ""
    905 
    906 #: templates/settings.php:189
    907 msgid "Database Driver"
    908 msgstr ""
    909 
    910 #: templates/settings.php:192
    911 msgid "Streaming"
    912 msgstr ""
    913 
    914 #: templates/settings.php:198
    915 msgid "OpenSSL"
    916 msgstr ""
    917 
    918 #: templates/settings.php:199
    919 msgid "Active"
    920 msgstr ""
    921 
    922 #: templates/settings.php:199
    923 msgid "Inactive"
    924 msgstr ""
    925 
    926 #: templates/settings.php:201
    927 msgid "Encrypted"
    928 msgstr ""
    929 
    930 #: templates/settings.php:209
    931 msgid "Backup Storage Destination"
    932 msgstr ""
    933 
    934 #: templates/settings.php:212
    935 msgid "Isolated, protected path used to safely store archive files away from public access:"
    936 msgstr ""
    937 
    938 #: templates/settings.php:218
    939 msgid "Run Storage Write Test"
    940 msgstr ""
    941 
    942 #: templates/settings.php:229
    943 msgid "System & Activity Log Stream"
    944 msgstr ""
    945 
    946 #: templates/settings.php:233
    947 msgid "Refresh"
    948 msgstr ""
    949 
    950 #: templates/settings.php:243
    951 msgid "System Activity Log (Last 100 entries)"
    952 msgstr ""
    953 
    954 #: templates/settings.php:251
    955 msgid "No recent log entries found."
    956 msgstr ""
    957 
    958 #: templates/settings.php:277
    959 msgid "Configure which files, folders, or sizes should be skipped during backup creation to save disk space and maximize speed."
    960 msgstr ""
    961 
    962 #: templates/settings.php:282
    963 msgid "Excluded paths and patterns (one per line)"
    964 msgstr ""
    965 
    966 #: templates/settings.php:283
    967 msgid "Folders or file patterns that will be excluded from the backup archive (e.g. wp-content/cache/, *.mp4)."
    968 msgstr ""
    969 
    970 #: templates/settings.php:287
    971 msgid "Examples: wp-content/uploads/2022/, *.mp4, node_modules/. Cache and backup folders are always skipped automatically."
    972 msgstr ""
    973 
    974 #: templates/settings.php:294
    975 msgid "Skip files larger than (MB, 0 = no limit)"
    976 msgstr ""
    977 
    978 #: templates/settings.php:295
    979 msgid "Files exceeding this size threshold will be skipped to keep backups fast and reliable. Enter 0 for no limit."
    980 msgstr ""
    981 
    982 #: templates/settings.php:303
    983 msgid "Files packed per request"
    984 msgstr ""
    985 
    986 #: templates/settings.php:304
    987 msgid "Batch size for slicing file packing per tick. Default 1000 files ensures fast backup on modern systems."
    988 msgstr ""
    989 
    990 #: templates/settings.php:320
    991 msgid "Backup archives and standalone installers are stored locally in a secure, protected directory on your server."
    992 msgstr ""
    993 
    994 #: templates/settings.php:325
    995 msgid "Primary Destination Driver"
    996 msgstr ""
    997 
    998 #: templates/settings.php:326
    999 msgid "Primary storage destination for completed packages. Local protected storage is used."
    1000 msgstr ""
    1001 
    1002 #: templates/settings.php:340
    1003 msgid "Protected Directory Path"
    1004 msgstr ""
    1005 
    1006 #: templates/settings.php:344
    1007 msgid "This location contains an .htaccess file blocking direct HTTP requests and indexing for maximum security."
    1008 msgstr ""
    1009 
    1010 #: templates/settings.php:357
    1011 msgid "Backupino can announce every finished backup, with the permanent download link, in Telegram or Bale. You can enable either or both messengers simultaneously."
    1012 msgstr ""
    1013 
    1014 #: templates/settings.php:365
    1015 msgid "Telegram Notification"
    1016 msgstr ""
    1017 
    1018 #: templates/settings.php:369
    1019 msgid "Enable Telegram"
    1020 msgstr ""
    1021 
    1022 #: templates/settings.php:375
    1023 msgid "Telegram Bot Token"
    1024 msgstr ""
    1025 
    1026 #: templates/settings.php:376
    1027 msgid "Bot token obtained from Telegram @BotFather."
    1028 msgstr ""
    1029 
    1030 #: templates/settings.php:384
    1031 msgid "Telegram Chat ID"
    1032 msgstr ""
    1033 
    1034 #: templates/settings.php:385
    1035 msgid "Telegram numeric chat or channel ID."
    1036 msgstr ""
    1037 
    1038 #: templates/settings.php:395
    1039 msgid "Test Telegram"
    1040 msgstr ""
    1041 
    1042 #: templates/settings.php:406
    1043 msgid "Bale Notification"
    1044 msgstr ""
    1045 
    1046 #: templates/settings.php:410
    1047 msgid "Enable Bale"
    1048 msgstr ""
    1049 
    1050 #: templates/settings.php:416
    1051 msgid "Bale Bot Token"
    1052 msgstr ""
    1053 
    1054 #: templates/settings.php:417
    1055 msgid "Bot token obtained from Bale @BotFather."
    1056 msgstr ""
    1057 
    1058 #: templates/settings.php:425
    1059 msgid "Bale Chat ID"
    1060 msgstr ""
    1061 
    1062 #: templates/settings.php:426
    1063 msgid "Bale numeric chat or channel ID."
    1064 msgstr ""
    1065 
    1066 #: templates/settings.php:436
    1067 msgid "Test Bale"
    1068 msgstr ""
    1069 
    1070 #: templates/settings.php:446
    1071 msgid "Backup Message Template"
    1072 msgstr ""
    1073 
    1074 #: templates/settings.php:449
    1075 msgid "Message template sent to messengers when a backup finishes."
    1076 msgstr ""
    1077 
    1078 #: templates/settings.php:460
    1079 #: templates/settings.php:492
    1080 msgid "Available tags:"
    1081 msgstr ""
    1082 
    1083 #: templates/settings.php:462
    1084 #: templates/settings.php:494
    1085 msgid "Site Name"
    1086 msgstr ""
    1087 
    1088 #: templates/settings.php:463
    1089 msgid "Backup Contents"
    1090 msgstr ""
    1091 
    1092 #: templates/settings.php:464
    1093 msgid "Backup Size"
    1094 msgstr ""
    1095 
    1096 #: templates/settings.php:465
    1097 msgid "Backup Date"
    1098 msgstr ""
    1099 
    1100 #: templates/settings.php:466
    1101 msgid "Download Link"
    1102 msgstr ""
    1103 
    1104 #: templates/settings.php:469
    1105 #: templates/settings.php:500
    1106 msgid "HTML formatting tags such as <b>bold</b> and <a href=\"...\">links</a> are supported."
    1107 msgstr ""
    1108 
    1109 #: templates/settings.php:478
    1110 msgid "Restoration Message Template"
    1111 msgstr ""
    1112 
    1113 #: templates/settings.php:481
    1114 msgid "Message template sent to messengers when the site is restored using the installer."
    1115 msgstr ""
    1116 
    1117 #: templates/settings.php:495
    1118 msgid "New Site URL"
    1119 msgstr ""
    1120 
    1121 #: templates/settings.php:496
    1122 msgid "Admin Login URL"
    1123 msgstr ""
    1124 
    1125 #: templates/settings.php:497
    1126 msgid "Restoration Date"
    1127 msgstr ""
    1128 
    1129 #. translators: %d: number of queued messages.
    1130 #: templates/settings.php:512
    1131 #, php-format
    1132 msgid "%d message is waiting to be resent on the next scheduled run."
    1133 msgid_plural "%d messages are waiting to be resent on the next scheduled run."
    1134 msgstr[0] ""
    1135 msgstr[1] ""
    1136 
    1137 #: templates/settings.php:529
    1138 msgid "Automatic recurring backups trigger via WordPress cron. In Persian locale, monthly schedules automatically align with the start of the Jalali month."
    1139 msgstr ""
    1140 
    1141 #: templates/settings.php:534
    1142 msgid "Run automatic backups"
    1143 msgstr ""
    1144 
    1145 #: templates/settings.php:535
    1146 msgid "Enables recurring background backup jobs using WordPress built-in WP-Cron scheduler."
    1147 msgstr ""
    1148 
    1149 #: templates/settings.php:541
    1150 msgid "Frequency"
    1151 msgstr ""
    1152 
    1153 #: templates/settings.php:542
    1154 msgid "Monthly execution triggers on the 1st of each Persian/Gregorian month based on site language."
    1155 msgstr ""
    1156 
    1157 #: templates/settings.php:546
    1158 msgid "Monthly (first day of the month)"
    1159 msgstr ""
    1160 
    1161 #: templates/settings.php:553
    1162 msgid "Keep at most (backups)"
    1163 msgstr ""
    1164 
    1165 #: templates/settings.php:554
    1166 msgid "Maximum number of recent backups to keep on disk. Older packages are automatically pruned to save space."
    1167 msgstr ""
    1168 
    1169 #: templates/settings.php:569
    1170 msgid "Configure preset credentials for the standalone migration installer generated with each backup."
    1171 msgstr ""
    1172 
    1173 #: templates/settings.php:575
    1174 msgid "Installer password (optional)"
    1175 msgstr ""
    1176 
    1177 #: templates/settings.php:576
    1178 msgid "Password protecting installer.php when accessed via browser during migration or restoration."
    1179 msgstr ""
    1180 
    1181 #: templates/settings.php:583
    1182 msgid "Default new URL (optional)"
    1183 msgstr ""
    1184 
    1185 #: templates/settings.php:584
    1186 msgid "Preset target URL for search & replace when migrating to a known new domain."
    1187 msgstr ""
    1188 
    1189 #: templates/settings.php:600
    1190 msgid "Receive critical security notices, product updates, and roadmap announcements (opt-in)."
    1191 msgstr ""
    1192 
    1193 #: templates/settings.php:601
    1194 msgid "100% privacy-compliant: zero tracking, zero telemetry, strictly optional notifications."
    1195 msgstr ""
    1196 
    1197 #: templates/settings.php:604
    1198 msgid "We respect your privacy. No telemetry or personal data is collected or sent without your explicit consent."
    1199 msgstr ""
    1200 
    1201 #: templates/settings.php:611
    1202 msgid "Current Version:"
    1203 msgstr ""
    1204 
    1205 #: templates/settings.php:612
    1206 msgid "Plugin updates are delivered securely through the official WordPress repository."
    1207 msgstr ""
    1208 
    1209 #: templates/settings.php:623
    1210 msgid "Save settings"
    1211 msgstr ""
  • backupino/trunk/readme.txt

    r3800361 r3809656  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.0.5
     7Stable tag: 1.1.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    7676
    7777= Where are backup packages stored? =
    78 Packages are stored locally in `/wp-content/backupino/packages/` (outside of the public uploads directory for enhanced security and isolation). The directory is secured with `.htaccess`, `web.config`, and empty `index.php` guards to prevent direct public file browsing and execution.
     78Packages are stored locally in `backupino/packages/` inside your site's configured WordPress uploads directory (`basedir` returned by `wp_upload_dir()`, which is typically under `wp-content/uploads/backupino/packages/` on default installations, though the full path may vary on sites with a custom uploads directory). If `wp_upload_dir()` does not return a `basedir`, Backupino falls back to `backupino/packages/` inside `WP_CONTENT_DIR`.
     79
     80Backupino writes `.htaccess` (for Apache/LiteSpeed), `web.config` (for IIS), and `index.html` (which only prevents directory listing) inside its storage directories. **Important for Nginx:** Nginx ignores `.htaccess` and `web.config`, and `index.html` does not block direct requests to a known package URL. On Nginx (or Nginx reverse proxies serving static files), direct HTTP access to backup files is **not guaranteed to be blocked** until you add a server-level deny rule inside your Nginx `server { }` block (adjusting the path if your uploads directory is customized) and reload Nginx:
     81
     82`location ^~ /wp-content/uploads/backupino/ { deny all; return 403; }`
     83
     84Authorized downloads through Backupino's WordPress admin screen and permanent download link are streamed via PHP and continue working normally with this rule enabled.
    7985
    8086= Does the permanent download link ever expire? =
    … …  
    101107== Upgrade Notice ==
    102108
     109= 1.1.0 =
     110Feature and enhancement release. Adds optional WordPress administrator account creation during standalone restore, restores animated plugin icon, hands off translations to GlotPress, and updates translation catalog.
     111
    103112= 1.0.5 =
    104113Bundled full Persian (fa_IR) localization, static PNG/SVG directory icons, and clean .distignore distribution packaging.
    105114
    106115= 1.0.4 =
    107 Security, compliance, and platform hardening release addressing WordPress.org directory requirements.
     116Security and compliance update. Eliminates unconsented public attributions, replaces error_reporting and raw cURL with WordPress-standard mechanisms, replaces mysqli with PDO prepared statements, quarantines web server configs, and heals table prefix casing.
    108117
    109118= 1.0.3 =
    … …  
    120129
    121130== Changelog ==
     131
     132= 1.1.0 =
     133* Feature: Added optional new WordPress Administrator account creation during restoration in the standalone installer with secure password hashing and capability assignment.
     134* UI: Restored SMIL animated SVG plugin icon for enhanced branding while maintaining crisp high-resolution display.
     135* i18n: Removed bundled local Persian .po/.mo translation files in favor of official WordPress.org GlotPress language packs (translate.wordpress.org).
     136* i18n: Updated backupino.pot catalog with all newly introduced installer strings.
    122137
    123138= 1.0.5 =
  • backupino/trunk/src/Backup/InstallerBuilder.php

    r3800274 r3809656  
    4040                'UrlRewrite.php',
    4141                'ConfigWriter.php',
     42                'AdminCreator.php',
    4243                'View.php',
    4344        );
    … …  
    113114
    114115                $template = (string) file_get_contents( $template_path ); // phpcs:ignore WordPress.WP.AlternativeFunctions
     116
     117                // Ensure an independent server-only secret for state encryption and session signing
     118                // that is never derived from or equal to the browser-facing CSRF token.
     119                $existing_secret = isset( $payload['state_secret'] ) ? (string) $payload['state_secret'] : '';
     120                $public_token    = isset( $payload['token'] ) ? (string) $payload['token'] : '';
     121                if ( strlen( $existing_secret ) < 32 || ( '' !== $public_token && hash_equals( $public_token, $existing_secret ) ) ) {
     122                        $payload['state_secret'] = bin2hex( random_bytes( 32 ) );
     123                }
    115124
    116125                $json = function_exists( 'wp_json_encode' ) ? wp_json_encode( $payload ) : json_encode( $payload );
    … …  
    178187
    179188                $defaults = array(
    180                         'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.0.4',
     189                        'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.1.0',
    181190                        'name'         => $name,
    182191                        'token'        => \Backupino\Support\Str::random( 16 ),
  • backupino/trunk/src/Backup/Stages/FinalizeStage.php

    r3800274 r3809656  
    176176                $meta = array(
    177177                        'generator'    => 'Backupino',
    178                         'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.0.0',
     178                        'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.1.0',
    179179                        'created'      => $context->clock()->now_mysql(),
    180180                        'site_url'     => home_url(),
    … …  
    207207
    208208                $payload = array(
    209                         'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.0.4',
     209                        'version'      => defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.1.0',
    210210                        'name'         => $name,
    211211                        'token'        => Str::random( 16 ),
  • backupino/trunk/src/Core/Compatibility.php

    r3800274 r3809656  
    105105                }
    106106
     107                if ( self::is_nginx() ) {
     108                        $warnings[] = __( 'Nginx web server detected: Nginx ignores .htaccess and web.config files, and index.html only hides directory listing. Direct HTTP access to backup files is NOT guaranteed to be blocked until your server administrator adds the server-level Nginx deny rule in Backupino -> Settings -> Storage Destination and reloads Nginx. Backupino cannot automatically alter or reload Nginx configuration.', 'backupino' );
     109                }
     110
    107111                return $warnings;
     112        }
     113
     114        /**
     115         * Detect whether the current request is served behind Nginx (best-effort).
     116         *
     117         * Note: Detection is purely informational and best-effort. Reverse proxies
     118         * or caching servers sitting in front of Apache or PHP-FPM might not advertise
     119         * Nginx in SERVER_SOFTWARE. User-controlled request headers (such as HTTP_X_*)
     120         * are intentionally NOT trusted for security reasons.
     121         *
     122         * @param string|null $server_software Optional SERVER_SOFTWARE override for testing.
     123         * @return bool
     124         */
     125        public static function is_nginx( ?string $server_software = null ): bool {
     126                if ( null === $server_software ) {
     127                        if ( isset( $GLOBALS['is_nginx'] ) && true === $GLOBALS['is_nginx'] ) {
     128                                return true;
     129                        }
     130                        // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Read-only server banner check.
     131                        $server_software = isset( $_SERVER['SERVER_SOFTWARE'] ) ? (string) wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) : '';
     132                }
     133
     134                return false !== stripos( $server_software, 'nginx' );
     135        }
     136
     137        /**
     138         * Extract canonical origin components (scheme, host, effective port) from an absolute URL.
     139         *
     140         * Returns null if the URL is relative, protocol-relative, invalid, or has an unsupported scheme.
     141         *
     142         * @param string $url URL to parse.
     143         * @return array{scheme: string, host: string, port: int}|null
     144         */
     145        public static function extract_origin( string $url ): ?array {
     146                $trimmed = trim( $url );
     147                if ( '' === $trimmed || 0 === strpos( $trimmed, '//' ) ) {
     148                        return null;
     149                }
     150
     151                $parts = wp_parse_url( $trimmed );
     152                if ( false === $parts || ! is_array( $parts ) ) {
     153                        return null;
     154                }
     155
     156                $scheme = isset( $parts['scheme'] ) ? strtolower( (string) $parts['scheme'] ) : '';
     157                $host   = isset( $parts['host'] ) ? strtolower( (string) $parts['host'] ) : '';
     158
     159                if ( '' === $scheme || '' === $host || ! in_array( $scheme, array( 'http', 'https' ), true ) ) {
     160                        return null;
     161                }
     162
     163                if ( isset( $parts['port'] ) ) {
     164                        if ( ! is_int( $parts['port'] ) && ! ctype_digit( (string) $parts['port'] ) ) {
     165                                return null;
     166                        }
     167                        $port = (int) $parts['port'];
     168                        if ( $port < 1 || $port > 65535 ) {
     169                                return null;
     170                        }
     171                } else {
     172                        $port = 'https' === $scheme ? 443 : 80;
     173                }
     174
     175                return array(
     176                        'scheme' => $scheme,
     177                        'host'   => $host,
     178                        'port'   => $port,
     179                );
     180        }
     181
     182        /**
     183         * Detailed inspection of Nginx storage protection and location block generation.
     184         *
     185         * Only generates a concrete `location ^~` directive when the storage web path can be
     186         * reliably and safely determined relative to ABSPATH or the site/home URL (same-origin).
     187         * If uploads point to an external CDN, a different host, or an indeterminate path,
     188         * status is set to 'manual' to prevent displaying inaccurate or misleading Nginx rules.
     189         *
     190         * Output paths are strictly sanitized to prevent directive injection, newlines, and traversal.
     191         *
     192         * @param Paths $paths Storage layout.
     193         * @return array{status: string, rule: string, web_path: string, fs_path: string, reason: string}
     194         */
     195        public static function nginx_storage_info( Paths $paths ): array {
     196                $base    = rtrim( str_replace( '\\', '/', $paths->base() ), '/' );
     197                $root    = rtrim( str_replace( '\\', '/', $paths->root() ), '/' );
     198                $fs_path = $paths->packages();
     199
     200                $uploads_baseurl = '';
     201                $uploads_basedir = '';
     202                if ( function_exists( 'wp_upload_dir' ) ) {
     203                        $uploads         = wp_upload_dir( null, false );
     204                        $uploads_baseurl = isset( $uploads['baseurl'] ) ? (string) $uploads['baseurl'] : '';
     205                        $uploads_basedir = isset( $uploads['basedir'] ) ? rtrim( str_replace( '\\', '/', (string) $uploads['basedir'] ), '/' ) : '';
     206                }
     207
     208                $candidate_path = '';
     209
     210                // 1. Primary resolution: If base is inside wp_upload_dir basedir, map through baseurl.
     211                $is_inside_uploads = '' !== $uploads_basedir && ( $base === $uploads_basedir || 0 === strpos( $base, $uploads_basedir . '/' ) );
     212                if ( $is_inside_uploads ) {
     213                        $trimmed_baseurl = trim( $uploads_baseurl );
     214                        if ( '' === $trimmed_baseurl ) {
     215                                return array(
     216                                        'status'   => 'manual',
     217                                        'rule'     => '',
     218                                        'web_path' => '',
     219                                        'fs_path'  => $fs_path,
     220                                        'reason'   => 'invalid_baseurl',
     221                                );
     222                        }
     223
     224                        // Reject protocol-relative URLs (e.g. //cdn.example.org/uploads).
     225                        if ( 0 === strpos( $trimmed_baseurl, '//' ) ) {
     226                                return array(
     227                                        'status'   => 'manual',
     228                                        'rule'     => '',
     229                                        'web_path' => '',
     230                                        'fs_path'  => $fs_path,
     231                                        'reason'   => 'protocol_relative',
     232                                );
     233                        }
     234
     235                        $parsed_baseurl = wp_parse_url( $trimmed_baseurl );
     236                        if ( false === $parsed_baseurl || ! is_array( $parsed_baseurl ) ) {
     237                                return array(
     238                                        'status'   => 'manual',
     239                                        'rule'     => '',
     240                                        'web_path' => '',
     241                                        'fs_path'  => $fs_path,
     242                                        'reason'   => 'malformed_baseurl',
     243                                );
     244                        }
     245
     246                        // Reject unexpected query, fragment, or user credentials in baseurl.
     247                        if ( isset( $parsed_baseurl['query'] ) || isset( $parsed_baseurl['fragment'] ) || isset( $parsed_baseurl['user'] ) || isset( $parsed_baseurl['pass'] ) ) {
     248                                return array(
     249                                        'status'   => 'manual',
     250                                        'rule'     => '',
     251                                        'web_path' => '',
     252                                        'fs_path'  => $fs_path,
     253                                        'reason'   => 'unexpected_url_components',
     254                                );
     255                        }
     256
     257                        $upload_path = isset( $parsed_baseurl['path'] ) ? (string) $parsed_baseurl['path'] : '';
     258                        $is_absolute = isset( $parsed_baseurl['scheme'] ) || isset( $parsed_baseurl['host'] );
     259
     260                        if ( $is_absolute ) {
     261                                $upload_origin = self::extract_origin( $trimmed_baseurl );
     262                                if ( null === $upload_origin ) {
     263                                        return array(
     264                                                'status'   => 'manual',
     265                                                'rule'     => '',
     266                                                'web_path' => '',
     267                                                'fs_path'  => $fs_path,
     268                                                'reason'   => 'invalid_origin',
     269                                        );
     270                                }
     271
     272                                // Resolve expected site origins from home_url() and site_url().
     273                                $home_url    = function_exists( 'home_url' ) ? (string) home_url() : '';
     274                                $site_url    = function_exists( 'site_url' ) ? (string) site_url() : '';
     275                                $home_origin = '' !== $home_url ? self::extract_origin( $home_url ) : null;
     276                                $site_origin = '' !== $site_url ? self::extract_origin( $site_url ) : null;
     277
     278                                // Fail closed if neither home_url nor site_url provides a valid origin to verify against.
     279                                if ( null === $home_origin && null === $site_origin ) {
     280                                        return array(
     281                                                'status'   => 'manual',
     282                                                'rule'     => '',
     283                                                'web_path' => '',
     284                                                'fs_path'  => $fs_path,
     285                                                'reason'   => 'missing_expected_origin',
     286                                        );
     287                                }
     288
     289                                // Check exact same-origin match (scheme, hostname, effective port).
     290                                $matches_home = null !== $home_origin &&
     291                                        $upload_origin['scheme'] === $home_origin['scheme'] &&
     292                                        $upload_origin['host'] === $home_origin['host'] &&
     293                                        $upload_origin['port'] === $home_origin['port'];
     294
     295                                $matches_site = null !== $site_origin &&
     296                                        $upload_origin['scheme'] === $site_origin['scheme'] &&
     297                                        $upload_origin['host'] === $site_origin['host'] &&
     298                                        $upload_origin['port'] === $site_origin['port'];
     299
     300                                if ( ! $matches_home && ! $matches_site ) {
     301                                        return array(
     302                                                'status'   => 'manual',
     303                                                'rule'     => '',
     304                                                'web_path' => '',
     305                                                'fs_path'  => $fs_path,
     306                                                'reason'   => 'origin_mismatch',
     307                                        );
     308                                }
     309                        } else {
     310                                // Relative URL: must start strictly with '/' and not contain scheme markers or traversal.
     311                                if ( '' === $upload_path || 0 !== strpos( $upload_path, '/' ) ) {
     312                                        return array(
     313                                                'status'   => 'manual',
     314                                                'rule'     => '',
     315                                                'web_path' => '',
     316                                                'fs_path'  => $fs_path,
     317                                                'reason'   => 'invalid_relative_path',
     318                                        );
     319                                }
     320                        }
     321
     322                        if ( '' === trim( $upload_path ) ) {
     323                                return array(
     324                                        'status'   => 'manual',
     325                                        'rule'     => '',
     326                                        'web_path' => '',
     327                                        'fs_path'  => $fs_path,
     328                                        'reason'   => 'invalid_path',
     329                                );
     330                        }
     331
     332                        $rel_to_upload  = substr( $base, strlen( $uploads_basedir ) );
     333                        $candidate_path = rtrim( $upload_path, '/' ) . '/' . ltrim( $rel_to_upload, '/' );
     334                } elseif ( '' !== $root && ( $base === $root || 0 === strpos( $base, $root . '/' ) ) ) {
     335                        // 2. Fallback resolution: If base is directly inside ABSPATH / root.
     336                        $rel_to_root = substr( $base, strlen( $root ) );
     337                        $site_ref    = function_exists( 'site_url' ) && '' !== (string) site_url()
     338                                ? (string) site_url()
     339                                : ( function_exists( 'home_url' ) ? (string) home_url() : '' );
     340                        $site_path   = (string) wp_parse_url( $site_ref, PHP_URL_PATH );
     341                        $site_path   = '/' . trim( $site_path, '/' );
     342
     343                        if ( '/' !== $site_path && '' !== $site_path && 0 !== strpos( $rel_to_root, $site_path . '/' ) ) {
     344                                $candidate_path = rtrim( $site_path, '/' ) . '/' . ltrim( $rel_to_root, '/' );
     345                        } else {
     346                                $candidate_path = '/' . ltrim( $rel_to_root, '/' );
     347                        }
     348                }
     349
     350                // If candidate path cannot be determined or resolved relative to webroot, require manual configuration.
     351                if ( '' === $candidate_path ) {
     352                        return array(
     353                                'status'   => 'manual',
     354                                'rule'     => '',
     355                                'web_path' => '',
     356                                'fs_path'  => $fs_path,
     357                                'reason'   => 'outside_root',
     358                        );
     359                }
     360
     361                // 3. Strict security validation: reject control characters, newlines, NUL bytes, directive injection, and traversal.
     362                if ( false !== strpos( $candidate_path, "\n" ) ||
     363                     false !== strpos( $candidate_path, "\r" ) ||
     364                     false !== strpos( $candidate_path, "\0" ) ||
     365                     false !== strpos( $candidate_path, ';' ) ||
     366                     false !== strpos( $candidate_path, '{' ) ||
     367                     false !== strpos( $candidate_path, '}' ) ) {
     368                        return array(
     369                                'status'   => 'manual',
     370                                'rule'     => '',
     371                                'web_path' => '',
     372                                'fs_path'  => $fs_path,
     373                                'reason'   => 'unsafe_chars',
     374                        );
     375                }
     376
     377                // Reject any path segment containing '.' or '..' traversal, or empty segments.
     378                $segments = explode( '/', trim( $candidate_path, '/' ) );
     379                foreach ( $segments as $seg ) {
     380                        if ( '' === $seg || '.' === $seg || '..' === $seg ) {
     381                                return array(
     382                                        'status'   => 'manual',
     383                                        'rule'     => '',
     384                                        'web_path' => '',
     385                                        'fs_path'  => $fs_path,
     386                                        'reason'   => 'traversal',
     387                                );
     388                        }
     389                }
     390
     391                // Strictly validate characters: Never mutate or strip characters silently.
     392                // If the candidate path contains any characters outside [A-Za-z0-9/_.-] (such as %20, spaces, etc.),
     393                // refuse to generate a misleading rule and fail closed to manual status.
     394                if ( 1 !== preg_match( '#^[A-Za-z0-9/_.\-]+$#', $candidate_path ) ) {
     395                        return array(
     396                                'status'   => 'manual',
     397                                'rule'     => '',
     398                                'web_path' => '',
     399                                'fs_path'  => $fs_path,
     400                                'reason'   => 'disallowed_chars',
     401                        );
     402                }
     403
     404                $trimmed = trim( $candidate_path, '/' );
     405
     406                // Prevent matching the entire document root or invalid short paths.
     407                if ( '' === $trimmed || strlen( $trimmed ) < 2 ) {
     408                        return array(
     409                                'status'   => 'manual',
     410                                'rule'     => '',
     411                                'web_path' => '',
     412                                'fs_path'  => $fs_path,
     413                                'reason'   => 'root_path',
     414                        );
     415                }
     416
     417                $web_path = '/' . $trimmed . '/';
     418                $rule     = "location ^~ {$web_path} {\n    deny all;\n    return 403;\n}";
     419
     420                return array(
     421                        'status'   => 'exact',
     422                        'rule'     => $rule,
     423                        'web_path' => $web_path,
     424                        'fs_path'  => $fs_path,
     425                        'reason'   => 'ok',
     426                );
     427        }
     428
     429        /**
     430         * Build an Nginx server-block location rule denying direct HTTP access to the
     431         * Backupino storage directory. Uses `^~` so static-file regex rules cannot bypass it.
     432         *
     433         * Returns empty string if the web path cannot be reliably determined (e.g. external CDN or custom mapping).
     434         *
     435         * @param Paths $paths Storage layout.
     436         * @return string
     437         */
     438        public static function nginx_storage_rule( Paths $paths ): string {
     439                $info = self::nginx_storage_info( $paths );
     440                return $info['rule'];
    108441        }
    109442
    … …  
    115448         */
    116449        public static function snapshot( Paths $paths ): array {
     450                $nginx_info = self::nginx_storage_info( $paths );
     451
    117452                return array(
    118                         'php_version'      => PHP_VERSION,
    119                         'wp_version'       => function_exists( 'get_bloginfo' ) ? get_bloginfo( 'version' ) : '',
    120                         'memory_limit'     => (string) ini_get( 'memory_limit' ),
    121                         'max_execution'    => (int) ini_get( 'max_execution_time' ),
    122                         'post_max_size'    => (string) ini_get( 'post_max_size' ),
    123                         'disk_free'        => Fs::free_space( $paths->base() ),
    124                         'zip'              => class_exists( 'ZipArchive' ),
    125                         'openssl'          => extension_loaded( 'openssl' ),
    126                         'curl'             => extension_loaded( 'curl' ),
    127                         'suhosin'          => extension_loaded( 'suhosin' ),
    128                         'storage_writable' => Fs::is_writable_dir( $paths->base() ),
    129                         'storage_path'     => $paths->base(),
    130                         'blocking'         => self::blocking_issues(),
    131                         'warnings'         => self::warnings(),
     453                        'php_version'        => PHP_VERSION,
     454                        'wp_version'         => function_exists( 'get_bloginfo' ) ? get_bloginfo( 'version' ) : '',
     455                        'memory_limit'       => (string) ini_get( 'memory_limit' ),
     456                        'max_execution'      => (int) ini_get( 'max_execution_time' ),
     457                        'post_max_size'      => (string) ini_get( 'post_max_size' ),
     458                        'disk_free'          => Fs::free_space( $paths->base() ),
     459                        'zip'                => class_exists( 'ZipArchive' ),
     460                        'openssl'            => extension_loaded( 'openssl' ),
     461                        'curl'               => extension_loaded( 'curl' ),
     462                        'suhosin'            => extension_loaded( 'suhosin' ),
     463                        'is_nginx'           => self::is_nginx(),
     464                        'nginx_rule'         => $nginx_info['rule'],
     465                        'nginx_storage_info' => $nginx_info,
     466                        'storage_writable'   => Fs::is_writable_dir( $paths->base() ),
     467                        'storage_path'       => $paths->base(),
     468                        'blocking'           => self::blocking_issues(),
     469                        'warnings'           => self::warnings(),
    132470                );
    133471        }
  • backupino/trunk/src/Core/Paths.php

    r3800274 r3809656  
    2323
    2424        /**
    25          * Storage root (`wp-content/backupino` by default).
     25         * Storage root (`backupino` under the configured WordPress uploads `basedir`,
     26         * or `WP_CONTENT_DIR/backupino` if `basedir` is unavailable).
    2627         *
    2728         * @var string
    … …  
    5051         * Build from the current WordPress environment.
    5152         *
    52          * Uses wp-content/backupino outside of public uploads for enhanced security and isolation,
    53          * with automatic fallback to uploads directory if wp-content is not writable.
     53         * Resolves the storage root to `<basedir>/backupino` using `wp_upload_dir()`
     54         * whenever a non-empty `basedir` is returned, falling back to
     55         * `WP_CONTENT_DIR . '/backupino'` (or `ABSPATH . 'wp-content/backupino'`)
     56         * when `wp_upload_dir()` is unavailable or returns an empty `basedir`.
    5457         *
    5558         * @return self
  • backupino/trunk/src/Download/PublicDownload.php

    r3800274 r3809656  
    249249                        : plugins_url( 'assets/js/public-download.js', dirname( dirname( __DIR__ ) ) . '/backupino.php' );
    250250
    251                 wp_register_style( 'backupino-public-download', $css_url, array(), defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.0.4' );
     251                wp_register_style( 'backupino-public-download', $css_url, array(), defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.1.0' );
    252252                $inline_css = ':root { ' . $css_vars . ' } ' . $custom_styles;
    253253                wp_add_inline_style( 'backupino-public-download', $inline_css );
    254254                wp_enqueue_style( 'backupino-public-download' );
    255255
    256                 wp_register_script( 'backupino-public-download', $js_url, array(), defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.0.4', true );
     256                wp_register_script( 'backupino-public-download', $js_url, array(), defined( 'BACKUPINO_VERSION' ) ? BACKUPINO_VERSION : '1.1.0', true );
    257257                wp_enqueue_script( 'backupino-public-download' );
    258258
  • backupino/trunk/src/Installer/State.php

    r3800274 r3809656  
    1313
    1414// phpcs:disable WordPress.WP.AlternativeFunctions -- Standalone installer running outside WordPress environment.
     15// phpcs:disable WordPress.Security.EscapeOutput.ExceptionNotEscaped -- Offline standalone installer exceptions.
    1516
    1617/**
    17  * Stores wizard progress between AJAX requests.
     18 * Stores wizard progress between AJAX requests inside a per-run private `0700`
     19 * directory strictly outside the web document root, wrapped in an executable
     20 * PHP 403 guard and authenticated encryption using a server-only secret.
    1821 */
    1922final class State {
    2023
    2124        /**
     25         * Executable PHP guard prepended to every state file so direct HTTP access
     26         * fails closed even on misconfigured web servers (Apache, Nginx, IIS).
     27         *
     28         * @var string
     29         */
     30        public const GUARD_PREFIX = "<?php http_response_code( 403 ); exit; ?>\n";
     31
     32        /**
     33         * Prefix for per-run private state directories.
     34         *
     35         * @var string
     36         */
     37        public const RUN_DIR_PREFIX = 'backupino-run-';
     38
     39        /**
     40         * Filename of the state file inside a private run directory.
     41         *
     42         * @var string
     43         */
     44        public const STATE_FILENAME = 'state.php';
     45
     46        /**
    2247         * Absolute path of the state file.
    2348         *
    … …  
    2752
    2853        /**
     54         * Absolute path of the private per-run directory (when managed as a private run).
     55         *
     56         * @var string
     57         */
     58        private $run_dir;
     59
     60        /**
     61         * Opaque signed run handle (nonce.hmac) referencing the private run directory.
     62         *
     63         * @var string
     64         */
     65        private $run_handle;
     66
     67        /**
     68         * Server-only secret key used for authenticated encryption at rest.
     69         *
     70         * @var string
     71         */
     72        private $secret;
     73
     74        /**
     75         * When true, corrupted, tampered, or undecryptable state fails closed by throwing.
     76         *
     77         * @var bool
     78         */
     79        private $strict;
     80
     81        /**
    2982         * State data.
    3083         *
    … …  
    3689         * Constructor.
    3790         *
    38          * @param string $file Absolute path.
    39          */
    40         public function __construct( string $file ) {
    41                 $this->file = $file;
     91         * @param string $file       Absolute path of the state file.
     92         * @param string $secret     Optional server-only secret key for authenticated encryption.
     93         * @param string $run_dir    Optional owning private run directory.
     94         * @param string $run_handle Optional signed run handle.
     95         * @param bool   $strict     Fail closed on missing/tampered state during load.
     96         */
     97        public function __construct(
     98                string $file,
     99                string $secret = '',
     100                string $run_dir = '',
     101                string $run_handle = '',
     102                bool $strict = false
     103        ) {
     104                $this->file       = $file;
     105                $this->secret     = $secret;
     106                $this->run_dir    = $run_dir;
     107                $this->run_handle = $run_handle;
     108                $this->strict     = $strict;
    42109                $this->load();
    43110        }
    44111
    45112        /**
    46          * Load state from disk.
     113         * Normalize a filesystem path for cross-platform prefix comparisons.
     114         *
     115         * @param string $path Raw filesystem path.
     116         * @return string Normalized path without trailing slash (except root).
     117         */
     118        public static function normalize_path( string $path ): string {
     119                $path = trim( $path );
     120                if ( '' === $path ) {
     121                        return '';
     122                }
     123
     124                $resolved = @realpath( $path );
     125                if ( is_string( $resolved ) && '' !== $resolved ) {
     126                        $path = $resolved;
     127                }
     128
     129                $path   = str_replace( '\\', '/', $path );
     130                $prefix = '';
     131
     132                if ( preg_match( '/^([A-Za-z]:)\/(.*)$/', $path, $m ) ) {
     133                        $prefix = $m[1] . '/';
     134                        $rest   = $m[2];
     135                } elseif ( 0 === strpos( $path, '/' ) ) {
     136                        $prefix = '/';
     137                        $rest   = ltrim( $path, '/' );
     138                } else {
     139                        $rest = $path;
     140                }
     141
     142                $segments = array();
     143                foreach ( explode( '/', $rest ) as $part ) {
     144                        if ( '' === $part || '.' === $part ) {
     145                                continue;
     146                        }
     147                        if ( '..' === $part ) {
     148                                array_pop( $segments );
     149                                continue;
     150                        }
     151                        $segments[] = $part;
     152                }
     153
     154                $normalized = $prefix . implode( '/', $segments );
     155
     156                return '' === $normalized ? $prefix : $normalized;
     157        }
     158
     159        /**
     160         * Check whether a candidate directory is strictly outside the installer
     161         * working directory and the web server document root.
     162         *
     163         * @param string      $candidate_dir Candidate storage directory.
     164         * @param string      $web_dir       Installer working directory.
     165         * @param string|null $doc_root      Web server DOCUMENT_ROOT, if known.
     166         * @return bool
     167         */
     168        public static function is_outside_webroot( string $candidate_dir, string $web_dir, ?string $doc_root = null ): bool {
     169                $candidate = self::normalize_path( $candidate_dir );
     170                if ( '' === $candidate || ! is_dir( $candidate_dir ) ) {
     171                        return false;
     172                }
     173
     174                $roots = array();
     175                $web   = self::normalize_path( $web_dir );
     176                if ( '' !== $web ) {
     177                        $roots[] = $web;
     178                }
     179                if ( null !== $doc_root && '' !== trim( $doc_root ) ) {
     180                        $doc = self::normalize_path( $doc_root );
     181                        if ( '' !== $doc ) {
     182                                $roots[] = $doc;
     183                        }
     184                }
     185
     186                $case_insensitive = ( '\\' === DIRECTORY_SEPARATOR ) || ( 1 === preg_match( '/^[A-Za-z]:\//', $candidate ) );
     187                $cmp_candidate    = $case_insensitive ? strtolower( $candidate ) : $candidate;
     188
     189                foreach ( $roots as $root ) {
     190                        $cmp_root = $case_insensitive ? strtolower( $root ) : $root;
     191                        $cmp_root = rtrim( $cmp_root, '/' );
     192                        if ( '' === $cmp_root ) {
     193                                continue;
     194                        }
     195
     196                        if ( $cmp_candidate === $cmp_root || 0 === strpos( $cmp_candidate, $cmp_root . '/' ) ) {
     197                                return false;
     198                        }
     199                }
     200
     201                return true;
     202        }
     203
     204        /**
     205         * Find a writable base directory strictly outside the web document root and
     206         * installer working directory where a private `0700` directory can be created.
     207         *
     208         * @param string                  $web_dir    Installer working directory.
     209         * @param string|null             $doc_root   Web server DOCUMENT_ROOT.
     210         * @param array<int, string>|null $candidates Optional explicit candidate list (for testing).
     211         * @return string Normalized absolute path of the external base directory.
     212         *
     213         * @throws \RuntimeException If no secure external storage directory is available.
     214         */
     215        public static function find_secure_base_dir(
     216                string $web_dir,
     217                ?string $doc_root = null,
     218                ?array $candidates = null
     219        ): string {
     220                if ( null === $doc_root && isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
     221                        // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Server document root fallback during standalone restore.
     222                        $doc_root = (string) $_SERVER['DOCUMENT_ROOT'];
     223                }
     224
     225                if ( null === $candidates ) {
     226                        $candidates = self::default_candidate_dirs();
     227                }
     228
     229                $checked = array();
     230                foreach ( $candidates as $dir ) {
     231                        $dir = trim( (string) $dir );
     232                        if ( '' === $dir || is_link( $dir ) || ! is_dir( $dir ) ) {
     233                                continue;
     234                        }
     235
     236                        $normalized = self::normalize_path( $dir );
     237                        if ( '' === $normalized || isset( $checked[ $normalized ] ) ) {
     238                                continue;
     239                        }
     240                        $checked[ $normalized ] = true;
     241
     242                        if ( ! self::is_outside_webroot( $normalized, $web_dir, $doc_root ) ) {
     243                                continue;
     244                        }
     245
     246                        $probe_dir = rtrim( $normalized, '/' ) . '/.backupino-probe-' . bin2hex( random_bytes( 8 ) );
     247                        if ( ! @mkdir( $probe_dir, 0700, false ) ) {
     248                                continue;
     249                        }
     250                        @chmod( $probe_dir, 0700 );
     251                        $ok = ! is_link( $probe_dir ) && is_dir( $probe_dir ) && self::is_outside_webroot( $probe_dir, $web_dir, $doc_root );
     252                        @rmdir( $probe_dir );
     253
     254                        if ( $ok ) {
     255                                return $normalized;
     256                        }
     257                }
     258
     259                throw new \RuntimeException(
     260                        'Secure temporary storage outside the web document root is unavailable. Installation stopped to protect sensitive credentials.'
     261                );
     262        }
     263
     264        /**
     265         * Atomically create a brand-new, private `0700` run directory outside the web root
     266         * with a cryptographically random name independent of any browser-visible token.
     267         *
     268         * Rejects pre-existing directories, symlinks, invalid ownership, or unsafe permissions.
     269         *
     270         * @param string                  $web_dir      Installer working directory.
     271         * @param string                  $state_secret Independent server-only secret (>= 32 chars).
     272         * @param string                  $archive_name Archive basename for binding.
     273         * @param string|null             $doc_root     Web server DOCUMENT_ROOT.
     274         * @param array<int, string>|null $candidates   Optional explicit candidate list (for testing).
     275         * @return self
     276         *
     277         * @throws \RuntimeException If secure private storage cannot be created or verified.
     278         */
     279        public static function create_private_run(
     280                string $web_dir,
     281                string $state_secret,
     282                string $archive_name = '',
     283                ?string $doc_root = null,
     284                ?array $candidates = null
     285        ): self {
     286                if ( strlen( trim( $state_secret ) ) < 32 ) {
     287                        throw new \RuntimeException( 'Installer server-side security secret is missing or invalid.' );
     288                }
     289
     290                $base_dir = self::find_secure_base_dir( $web_dir, $doc_root, $candidates );
     291
     292                for ( $attempt = 0; $attempt < 8; ++$attempt ) {
     293                        $nonce   = bin2hex( random_bytes( 16 ) );
     294                        $run_dir = rtrim( $base_dir, '/' ) . '/' . self::RUN_DIR_PREFIX . $nonce;
     295
     296                        // Atomic creation (non-recursive) fails if directory or symlink already exists.
     297                        if ( ! @mkdir( $run_dir, 0700, false ) ) {
     298                                continue;
     299                        }
     300
     301                        @chmod( $run_dir, 0700 );
     302
     303                        try {
     304                                self::assert_private_dir_safe( $run_dir, $web_dir, $doc_root );
     305                        } catch ( \RuntimeException $e ) {
     306                                @rmdir( $run_dir );
     307                                throw $e;
     308                        }
     309
     310                        $handle     = $nonce . '.' . self::sign_run( $nonce, $web_dir, $archive_name, $state_secret );
     311                        $run_secret = self::derive_run_secret( $nonce, $web_dir, $state_secret );
     312                        $state_file = $run_dir . '/' . self::STATE_FILENAME;
     313
     314                        $state = new self( $state_file, $run_secret, $run_dir, $handle, false );
     315                        if ( ! $state->save() ) {
     316                                $state->destroy();
     317                                throw new \RuntimeException( 'Failed to initialize secure installer state.' );
     318                        }
     319
     320                        return $state;
     321                }
     322
     323                throw new \RuntimeException(
     324                        'Failed to allocate an exclusive private state directory. Installation stopped.'
     325                );
     326        }
     327
     328        /**
     329         * Open and verify an existing private run directory using its server-signed handle.
     330         *
     331         * Fails closed if the handle signature is invalid, the directory or state file is a
     332         * symlink, owned by another user, inside webroot, pre-created, missing, or tampered.
     333         *
     334         * @param string                  $run_handle   Opaque signed handle (`<32-hex>.<64-hex>`).
     335         * @param string                  $web_dir      Installer working directory.
     336         * @param string                  $state_secret Independent server-only secret.
     337         * @param string                  $archive_name Archive basename for binding.
     338         * @param string|null             $doc_root     Web server DOCUMENT_ROOT.
     339         * @param array<int, string>|null $candidates   Optional explicit candidate list (for testing).
     340         * @return self
     341         *
     342         * @throws \RuntimeException On invalid handle, unsafe path/ownership, or tampered state.
     343         */
     344        public static function open_private_run(
     345                string $run_handle,
     346                string $web_dir,
     347                string $state_secret,
     348                string $archive_name = '',
     349                ?string $doc_root = null,
     350                ?array $candidates = null
     351        ): self {
     352                if ( strlen( trim( $state_secret ) ) < 32 ) {
     353                        throw new \RuntimeException( 'Installer server-side security secret is missing or invalid.' );
     354                }
     355
     356                if ( 1 !== preg_match( '/^([a-f0-9]{32})\.([a-f0-9]{64})$/', $run_handle, $m ) ) {
     357                        throw new \RuntimeException( 'Invalid or missing installer session handle.' );
     358                }
     359
     360                $nonce        = $m[1];
     361                $provided_sig = $m[2];
     362                $expected_sig = self::sign_run( $nonce, $web_dir, $archive_name, $state_secret );
     363
     364                if ( ! hash_equals( $expected_sig, $provided_sig ) ) {
     365                        throw new \RuntimeException( 'Installer session verification failed.' );
     366                }
     367
     368                if ( null === $doc_root && isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
     369                        // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- Server document root fallback during standalone restore.
     370                        $doc_root = (string) $_SERVER['DOCUMENT_ROOT'];
     371                }
     372
     373                if ( null === $candidates ) {
     374                        $candidates = self::default_candidate_dirs();
     375                }
     376
     377                $run_dir = '';
     378                $checked = array();
     379                foreach ( $candidates as $dir ) {
     380                        $dir = trim( (string) $dir );
     381                        if ( '' === $dir || is_link( $dir ) || ! is_dir( $dir ) ) {
     382                                continue;
     383                        }
     384                        $normalized = self::normalize_path( $dir );
     385                        if ( '' === $normalized || isset( $checked[ $normalized ] ) ) {
     386                                continue;
     387                        }
     388                        $checked[ $normalized ] = true;
     389
     390                        $candidate_run = rtrim( $normalized, '/' ) . '/' . self::RUN_DIR_PREFIX . $nonce;
     391                        if ( file_exists( $candidate_run ) || is_link( $candidate_run ) ) {
     392                                $run_dir = $candidate_run;
     393                                break;
     394                        }
     395                }
     396
     397                if ( '' === $run_dir ) {
     398                        throw new \RuntimeException( 'Installer session state was not found or has expired.' );
     399                }
     400
     401                self::assert_private_dir_safe( $run_dir, $web_dir, $doc_root );
     402
     403                $state_file = $run_dir . '/' . self::STATE_FILENAME;
     404                self::assert_private_file_safe( $state_file, $run_dir );
     405
     406                $run_secret = self::derive_run_secret( $nonce, $web_dir, $state_secret );
     407
     408                return new self( $state_file, $run_secret, $run_dir, $run_handle, true );
     409        }
     410
     411        /**
     412         * Load state from disk. In strict mode, any missing, malformed, unguarded, or
     413         * tampered state fails closed by throwing RuntimeException.
    47414         *
    48415         * @return void
     416         *
     417         * @throws \RuntimeException In strict mode when state cannot be verified or decrypted.
    49418         */
    50419        public function load(): void {
     420                if ( is_link( $this->file ) ) {
     421                        $this->data = array();
     422                        if ( $this->strict ) {
     423                                throw new \RuntimeException( 'Installer state file is unsafe (symlink detected).' );
     424                        }
     425
     426                        return;
     427                }
     428
    51429                if ( ! is_readable( $this->file ) ) {
    52430                        $this->data = array();
     431                        if ( $this->strict ) {
     432                                throw new \RuntimeException( 'Installer state file is missing or unreadable.' );
     433                        }
    53434
    54435                        return;
    55436                }
    56437
    57                 $raw    = (string) file_get_contents( $this->file );
     438                $raw = @file_get_contents( $this->file );
     439                if ( ! is_string( $raw ) ) {
     440                        $this->data = array();
     441                        if ( $this->strict ) {
     442                                throw new \RuntimeException( 'Installer state file could not be read.' );
     443                        }
     444
     445                        return;
     446                }
     447
     448                if ( 0 !== strpos( $raw, self::GUARD_PREFIX ) ) {
     449                        $this->data = array();
     450                        if ( $this->strict ) {
     451                                throw new \RuntimeException( 'Installer state integrity check failed.' );
     452                        }
     453                } else {
     454                        $raw = substr( $raw, strlen( self::GUARD_PREFIX ) );
     455                }
     456
    58457                $parsed = json_decode( $raw, true );
    59 
    60                 $this->data = is_array( $parsed ) ? $parsed : array();
    61         }
    62 
    63         /**
    64          * Persist state atomically with restrictive permissions.
     458                if ( ! is_array( $parsed ) ) {
     459                        $this->data = array();
     460                        if ( $this->strict ) {
     461                                throw new \RuntimeException( 'Installer state is corrupted or tampered.' );
     462                        }
     463
     464                        return;
     465                }
     466
     467                if ( '' !== $this->secret ) {
     468                        $decrypted = $this->decrypt_envelope( $parsed );
     469                        if ( ! is_array( $decrypted ) ) {
     470                                $this->data = array();
     471                                if ( $this->strict ) {
     472                                        throw new \RuntimeException( 'Installer state decryption or authentication failed.' );
     473                                }
     474
     475                                return;
     476                        }
     477                        $this->data = $decrypted;
     478
     479                        return;
     480                }
     481
     482                $this->data = $parsed;
     483        }
     484
     485        /**
     486         * Persist state atomically with PHP guard, server-secret authenticated encryption,
     487         * and restrictive 0600 permissions inside the private run directory.
    65488         *
    66489         * @return bool
    67490         */
    68491        public function save(): bool {
    69                 $encoded = json_encode( $this->data );
    70 
    71                 if ( ! is_string( $encoded ) ) {
     492                if ( is_link( $this->file ) ) {
    72493                        return false;
    73494                }
    74495
    75                 $temp = $this->file . '.tmp';
    76 
    77                 if ( false === @file_put_contents( $temp, $encoded, LOCK_EX ) ) {
     496                if ( '' !== $this->run_dir && ( is_link( $this->run_dir ) || ! is_dir( $this->run_dir ) ) ) {
    78497                        return false;
    79498                }
    80499
     500                $plaintext = json_encode( $this->data );
     501                if ( ! is_string( $plaintext ) ) {
     502                        return false;
     503                }
     504
     505                if ( '' !== $this->secret ) {
     506                        $envelope = $this->encrypt_envelope( $plaintext );
     507                        $encoded  = json_encode( $envelope );
     508                        if ( ! is_string( $encoded ) ) {
     509                                return false;
     510                        }
     511                } else {
     512                        $encoded = $plaintext;
     513                }
     514
     515                $payload = self::GUARD_PREFIX . $encoded;
     516                $temp    = $this->file . '.tmp.' . bin2hex( random_bytes( 6 ) );
     517
     518                $fp = @fopen( $temp, 'xb' );
     519                if ( false === $fp ) {
     520                        return false;
     521                }
     522
    81523                @chmod( $temp, 0600 );
    82 
    83                 return @rename( $temp, $this->file );
     524                $written = @fwrite( $fp, $payload );
     525                @fflush( $fp );
     526                @fclose( $fp );
     527
     528                if ( false === $written || $written !== strlen( $payload ) ) {
     529                        @unlink( $temp );
     530
     531                        return false;
     532                }
     533
     534                if ( ! @rename( $temp, $this->file ) ) {
     535                        @unlink( $temp );
     536
     537                        return false;
     538                }
     539
     540                @chmod( $this->file, 0600 );
     541
     542                return true;
     543        }
     544
     545        /**
     546         * Absolute path of the state file.
     547         *
     548         * @return string
     549         */
     550        public function file(): string {
     551                return $this->file;
     552        }
     553
     554        /**
     555         * Absolute path of the private per-run directory.
     556         *
     557         * @return string
     558         */
     559        public function run_dir(): string {
     560                return $this->run_dir;
     561        }
     562
     563        /**
     564         * Opaque signed handle referencing this private run.
     565         *
     566         * @return string
     567         */
     568        public function handle(): string {
     569                return $this->run_handle;
    84570        }
    85571
    … …  
    87573         * Read a value.
    88574         *
    89          * @param string $key     Key.
     575         * @param string $key      Key.
    90576         * @param mixed  $fallback Fallback.
    91577         * @return mixed
    … …  
    107593
    108594        /**
     595         * Remove a single key from state.
     596         *
     597         * @param string $key Key.
     598         * @return void
     599         */
     600        public function remove( string $key ): void {
     601                unset( $this->data[ $key ] );
     602        }
     603
     604        /**
    109605         * Whether a key exists.
    110606         *
    … …  
    117613
    118614        /**
    119          * Delete the state file.
     615         * Purge sensitive credential keys from state immediately.
     616         *
     617         * When `$keep_auth_flag` is true and the session was authenticated with an
     618         * installer password, only the minimal non-sensitive authentication flag is
     619         * retained so the final cleanup step can still be authorized. Otherwise the
     620         * entire private run state and directory are destroyed immediately.
     621         *
     622         * @param bool $keep_auth_flag Whether to preserve minimal non-sensitive auth status.
     623         * @return void
     624         */
     625        public function purge_sensitive( bool $keep_auth_flag = false ): void {
     626                unset( $this->data['db'], $this->data['admin_account'] );
     627
     628                if ( $keep_auth_flag && ! empty( $this->data['authenticated'] ) ) {
     629                        $this->data = array(
     630                                'authenticated' => true,
     631                                'finished'      => ! empty( $this->data['finished'] ),
     632                        );
     633                        $this->cleanup_crash_temps();
     634                        $this->save();
     635
     636                        return;
     637                }
     638
     639                $this->destroy();
     640        }
     641
     642        /**
     643         * Delete the state file, any crash-leftover `.tmp.*` files strictly inside this
     644         * run's private directory, and remove the private directory itself.
     645         *
     646         * Never touches files belonging to other runs, shared temp files, or user files.
    120647         *
    121648         * @return void
    … …  
    124651                $this->data = array();
    125652
     653                if ( '' !== $this->run_dir && is_dir( $this->run_dir ) && ! is_link( $this->run_dir ) ) {
     654                        $this->cleanup_crash_temps();
     655
     656                        if ( is_file( $this->file ) || is_link( $this->file ) ) {
     657                                @chmod( $this->file, 0600 );
     658                                @unlink( $this->file );
     659                        }
     660
     661                        @rmdir( $this->run_dir );
     662
     663                        return;
     664                }
     665
    126666                if ( is_file( $this->file ) ) {
     667                        @chmod( $this->file, 0600 );
    127668                        @unlink( $this->file );
     669                }
     670
     671                if ( is_file( $this->file . '.tmp' ) ) {
     672                        @unlink( $this->file . '.tmp' );
     673                }
     674        }
     675
     676        /**
     677         * Remove any crash-leftover temporary files (`state.php.tmp*`) strictly scoped
     678         * to this run's private directory.
     679         *
     680         * @return void
     681         */
     682        public function cleanup_crash_temps(): void {
     683                if ( '' === $this->run_dir || ! is_dir( $this->run_dir ) || is_link( $this->run_dir ) ) {
     684                        return;
     685                }
     686
     687                $entries = @scandir( $this->run_dir );
     688                if ( ! is_array( $entries ) ) {
     689                        return;
     690                }
     691
     692                $prefix = self::STATE_FILENAME . '.tmp';
     693                foreach ( $entries as $entry ) {
     694                        if ( '.' === $entry || '..' === $entry ) {
     695                                continue;
     696                        }
     697                        if ( $entry === $prefix || 1 === preg_match( '/^' . preg_quote( $prefix, '/' ) . '\.[a-f0-9]+$/i', $entry ) ) {
     698                                $path = rtrim( $this->run_dir, '/' ) . '/' . $entry;
     699                                if ( is_file( $path ) || is_link( $path ) ) {
     700                                        @chmod( $path, 0600 );
     701                                        @unlink( $path );
     702                                }
     703                        }
    128704                }
    129705        }
    … …  
    137713                return $this->data;
    138714        }
     715
     716        /**
     717         * Default external candidate directories outside webroot.
     718         *
     719         * @return array<int, string>
     720         */
     721        private static function default_candidate_dirs(): array {
     722                $candidates = array();
     723
     724                $sys_tmp = sys_get_temp_dir();
     725                if ( is_string( $sys_tmp ) && '' !== trim( $sys_tmp ) ) {
     726                        $candidates[] = $sys_tmp;
     727                }
     728
     729                $upload_tmp = (string) ini_get( 'upload_tmp_dir' );
     730                if ( '' !== trim( $upload_tmp ) ) {
     731                        $candidates[] = $upload_tmp;
     732                }
     733
     734                if ( function_exists( 'session_save_path' ) ) {
     735                        $sess_dir = (string) session_save_path();
     736                        if ( '' !== trim( $sess_dir ) ) {
     737                                if ( false !== strpos( $sess_dir, ';' ) ) {
     738                                        $parts    = explode( ';', $sess_dir );
     739                                        $sess_dir = (string) end( $parts );
     740                                }
     741                                if ( '' !== trim( $sess_dir ) ) {
     742                                        $candidates[] = $sess_dir;
     743                                }
     744                        }
     745                }
     746
     747                return $candidates;
     748        }
     749
     750        /**
     751         * Verify that a private run directory is real, not a symlink, outside webroot,
     752         * owned by the current OS user, and has no group/world access on POSIX systems.
     753         *
     754         * @param string      $dir      Candidate private run directory.
     755         * @param string      $web_dir  Installer working directory.
     756         * @param string|null $doc_root Web server DOCUMENT_ROOT.
     757         * @return void
     758         *
     759         * @throws \RuntimeException If any safety invariant fails.
     760         */
     761        private static function assert_private_dir_safe( string $dir, string $web_dir, ?string $doc_root ): void {
     762                if ( is_link( $dir ) || ! is_dir( $dir ) ) {
     763                        throw new \RuntimeException( 'Secure private state directory is missing or unsafe.' );
     764                }
     765
     766                if ( ! self::is_outside_webroot( $dir, $web_dir, $doc_root ) ) {
     767                        throw new \RuntimeException( 'State directory resolved inside web document root. Installation stopped.' );
     768                }
     769
     770                if ( '\\' !== DIRECTORY_SEPARATOR ) {
     771                        clearstatcache( true, $dir );
     772                        if ( function_exists( 'posix_geteuid' ) && function_exists( 'fileowner' ) ) {
     773                                $owner = @fileowner( $dir );
     774                                if ( false === $owner || $owner !== posix_geteuid() ) {
     775                                        throw new \RuntimeException( 'Private state directory ownership verification failed.' );
     776                                }
     777                        }
     778
     779                        $perms = @fileperms( $dir );
     780                        if ( false !== $perms && 0 !== ( $perms & 0077 ) ) {
     781                                throw new \RuntimeException( 'Private state directory permissions are too permissive.' );
     782                        }
     783                }
     784        }
     785
     786        /**
     787         * Verify that the state file inside a private run directory is a regular file
     788         * (not a symlink), lives inside the private directory, and has safe ownership/perms.
     789         *
     790         * @param string $file    Absolute state file path.
     791         * @param string $run_dir Expected parent private run directory.
     792         * @return void
     793         *
     794         * @throws \RuntimeException If any safety invariant fails.
     795         */
     796        private static function assert_private_file_safe( string $file, string $run_dir ): void {
     797                if ( is_link( $file ) || ! is_file( $file ) ) {
     798                        throw new \RuntimeException( 'Installer state file is missing or unsafe.' );
     799                }
     800
     801                $norm_dir  = rtrim( self::normalize_path( $run_dir ), '/' );
     802                $norm_file = self::normalize_path( $file );
     803                if ( 0 !== strpos( $norm_file, $norm_dir . '/' ) ) {
     804                        throw new \RuntimeException( 'Installer state file path escaped its private directory.' );
     805                }
     806
     807                if ( '\\' !== DIRECTORY_SEPARATOR ) {
     808                        clearstatcache( true, $file );
     809                        if ( function_exists( 'posix_geteuid' ) && function_exists( 'fileowner' ) ) {
     810                                $owner = @fileowner( $file );
     811                                if ( false === $owner || $owner !== posix_geteuid() ) {
     812                                        throw new \RuntimeException( 'Installer state file ownership verification failed.' );
     813                                }
     814                        }
     815
     816                        $perms = @fileperms( $file );
     817                        if ( false !== $perms && 0 !== ( $perms & 0077 ) ) {
     818                                throw new \RuntimeException( 'Installer state file permissions are too permissive.' );
     819                        }
     820                }
     821        }
     822
     823        /**
     824         * Compute the server-signed HMAC binding a run nonce to this installer instance.
     825         *
     826         * @param string $nonce        32-char hex nonce.
     827         * @param string $web_dir      Installer working directory.
     828         * @param string $archive_name Archive basename.
     829         * @param string $state_secret Server-only secret.
     830         * @return string 64-char hex HMAC-SHA256.
     831         */
     832        private static function sign_run( string $nonce, string $web_dir, string $archive_name, string $state_secret ): string {
     833                return hash_hmac(
     834                        'sha256',
     835                        'backupino-run-handle|' . $nonce . '|' . self::normalize_path( $web_dir ) . '|' . basename( $archive_name ),
     836                        $state_secret
     837                );
     838        }
     839
     840        /**
     841         * Derive the per-run encryption secret from the server-only secret and run nonce.
     842         *
     843         * @param string $nonce        32-char hex nonce.
     844         * @param string $web_dir      Installer working directory.
     845         * @param string $state_secret Server-only secret.
     846         * @return string
     847         */
     848        private static function derive_run_secret( string $nonce, string $web_dir, string $state_secret ): string {
     849                return hash_hmac(
     850                        'sha256',
     851                        'backupino-run-secret|' . $nonce . '|' . self::normalize_path( $web_dir ),
     852                        $state_secret
     853                );
     854        }
     855
     856        /**
     857         * Encrypt a JSON string into an authenticated envelope.
     858         *
     859         * @param string $plaintext JSON payload.
     860         * @return array<string, mixed>
     861         */
     862        private function encrypt_envelope( string $plaintext ): array {
     863                $enc_key = hash_hmac( 'sha256', 'backupino-state-enc', $this->secret, true );
     864                $mac_key = hash_hmac( 'sha256', 'backupino-state-mac', $this->secret, true );
     865
     866                if ( function_exists( 'openssl_encrypt' ) && function_exists( 'openssl_get_cipher_methods' ) ) {
     867                        $methods = openssl_get_cipher_methods();
     868
     869                        if ( in_array( 'aes-256-gcm', $methods, true ) ) {
     870                                $iv  = random_bytes( 12 );
     871                                $tag = '';
     872                                $ct  = openssl_encrypt( $plaintext, 'aes-256-gcm', $enc_key, OPENSSL_RAW_DATA, $iv, $tag );
     873                                if ( is_string( $ct ) && '' !== $tag ) {
     874                                        return array(
     875                                                'v'   => 2,
     876                                                'alg' => 'aes-256-gcm',
     877                                                'iv'  => base64_encode( $iv ),
     878                                                'tag' => base64_encode( $tag ),
     879                                                'ct'  => base64_encode( $ct ),
     880                                        );
     881                                }
     882                        }
     883
     884                        if ( in_array( 'aes-256-cbc', $methods, true ) ) {
     885                                $iv = random_bytes( 16 );
     886                                $ct = openssl_encrypt( $plaintext, 'aes-256-cbc', $enc_key, OPENSSL_RAW_DATA, $iv );
     887                                if ( is_string( $ct ) ) {
     888                                        $mac = hash_hmac( 'sha256', $iv . $ct, $mac_key, true );
     889
     890                                        return array(
     891                                                'v'   => 2,
     892                                                'alg' => 'aes-256-cbc-hmac',
     893                                                'iv'  => base64_encode( $iv ),
     894                                                'mac' => base64_encode( $mac ),
     895                                                'ct'  => base64_encode( $ct ),
     896                                        );
     897                                }
     898                        }
     899                }
     900
     901                // OpenSSL fallback: authenticated stream cipher (still inside 0700 private dir outside webroot + PHP 403 guard).
     902                $salt = random_bytes( 16 );
     903                $ct   = self::xor_stream( $plaintext, $enc_key, $salt );
     904                $mac  = hash_hmac( 'sha256', $salt . $ct, $mac_key, true );
     905
     906                return array(
     907                        'v'    => 2,
     908                        'alg'  => 'hmac-stream',
     909                        'salt' => base64_encode( $salt ),
     910                        'mac'  => base64_encode( $mac ),
     911                        'ct'   => base64_encode( $ct ),
     912                );
     913        }
     914
     915        /**
     916         * Decrypt and authenticate a persisted state envelope.
     917         *
     918         * @param array<string, mixed> $envelope Decoded envelope.
     919         * @return array<string, mixed>|null
     920         */
     921        private function decrypt_envelope( array $envelope ): ?array {
     922                if ( 2 !== (int) ( $envelope['v'] ?? 0 ) || empty( $envelope['alg'] ) || empty( $envelope['ct'] ) ) {
     923                        return null;
     924                }
     925
     926                $enc_key   = hash_hmac( 'sha256', 'backupino-state-enc', $this->secret, true );
     927                $mac_key   = hash_hmac( 'sha256', 'backupino-state-mac', $this->secret, true );
     928                $alg       = (string) $envelope['alg'];
     929                $ct        = base64_decode( (string) $envelope['ct'], true );
     930                $plaintext = false;
     931
     932                if ( ! is_string( $ct ) ) {
     933                        return null;
     934                }
     935
     936                if ( 'aes-256-gcm' === $alg && function_exists( 'openssl_decrypt' ) ) {
     937                        $iv  = base64_decode( (string) ( $envelope['iv'] ?? '' ), true );
     938                        $tag = base64_decode( (string) ( $envelope['tag'] ?? '' ), true );
     939                        if ( is_string( $iv ) && is_string( $tag ) ) {
     940                                $plaintext = openssl_decrypt( $ct, 'aes-256-gcm', $enc_key, OPENSSL_RAW_DATA, $iv, $tag );
     941                        }
     942                } elseif ( 'aes-256-cbc-hmac' === $alg && function_exists( 'openssl_decrypt' ) ) {
     943                        $iv  = base64_decode( (string) ( $envelope['iv'] ?? '' ), true );
     944                        $mac = base64_decode( (string) ( $envelope['mac'] ?? '' ), true );
     945                        if ( is_string( $iv ) && is_string( $mac ) ) {
     946                                $expected = hash_hmac( 'sha256', $iv . $ct, $mac_key, true );
     947                                if ( hash_equals( $expected, $mac ) ) {
     948                                        $plaintext = openssl_decrypt( $ct, 'aes-256-cbc', $enc_key, OPENSSL_RAW_DATA, $iv );
     949                                }
     950                        }
     951                } elseif ( 'hmac-stream' === $alg ) {
     952                        $salt = base64_decode( (string) ( $envelope['salt'] ?? '' ), true );
     953                        $mac  = base64_decode( (string) ( $envelope['mac'] ?? '' ), true );
     954                        if ( is_string( $salt ) && is_string( $mac ) ) {
     955                                $expected = hash_hmac( 'sha256', $salt . $ct, $mac_key, true );
     956                                if ( hash_equals( $expected, $mac ) ) {
     957                                        $plaintext = self::xor_stream( $ct, $enc_key, $salt );
     958                                }
     959                        }
     960                }
     961
     962                if ( ! is_string( $plaintext ) ) {
     963                        return null;
     964                }
     965
     966                $decoded = json_decode( $plaintext, true );
     967
     968                return is_array( $decoded ) ? $decoded : null;
     969        }
     970
     971        /**
     972         * Deterministic HMAC-SHA256 counter-mode XOR stream for environments without OpenSSL.
     973         *
     974         * @param string $input Data to encrypt or decrypt.
     975         * @param string $key   32-byte key.
     976         * @param string $salt  16-byte nonce/salt.
     977         * @return string
     978         */
     979        private static function xor_stream( string $input, string $key, string $salt ): string {
     980                $len     = strlen( $input );
     981                $out     = '';
     982                $counter = 0;
     983
     984                for ( $offset = 0; $offset < $len; $offset += 32 ) {
     985                        $block   = hash_hmac( 'sha256', $salt . pack( 'N', $counter ), $key, true );
     986                        $chunk   = substr( $input, $offset, 32 );
     987                        $out    .= $chunk ^ substr( $block, 0, strlen( $chunk ) );
     988                        ++$counter;
     989                }
     990
     991                return $out;
     992        }
    139993}
  • backupino/trunk/src/Installer/installer-template.php

    r3800274 r3809656  
    3434        $error = error_get_last();
    3535        if ( $error && in_array( $error['type'], array( E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR ), true ) ) {
     36                if ( isset( $GLOBALS['backupino_active_state'] ) && $GLOBALS['backupino_active_state'] instanceof State ) {
     37                        $GLOBALS['backupino_active_state']->purge_sensitive( false );
     38                }
    3639                while ( ob_get_level() > 0 ) {
    3740                        @ob_end_clean();
    … …  
    4346                echo json_encode( array(
    4447                        'ok'    => false,
    45                         'error' => 'Fatal Error: ' . $error['message'] . ' in ' . basename( $error['file'] ) . ':' . $error['line'],
     48                        'error' => 'A fatal server error occurred during installation. Temporary credentials have been cleared.',
    4649                ), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE );
    4750                exit;
    … …  
    9598}
    9699
    97 $backupino_state_file   = $backupino_dir . '/backupino-install.json';
    98100$backupino_archive_name = isset( $backupino_payload['archive'] ) ? basename( (string) $backupino_payload['archive'] ) : '';
    99101$backupino_archive      = $backupino_dir . '/' . $backupino_archive_name;
    100102$backupino_token        = isset( $backupino_payload['token'] ) ? (string) $backupino_payload['token'] : '';
     103$backupino_state_secret = isset( $backupino_payload['state_secret'] ) ? (string) $backupino_payload['state_secret'] : '';
    101104$backupino_action       = isset( $_REQUEST['action'] ) ? (string) preg_replace( '/[^a-z_]/', '', (string) $_REQUEST['action'] ) : 'index';
     105$backupino_doc_root     = isset( $_SERVER['DOCUMENT_ROOT'] ) ? (string) $_SERVER['DOCUMENT_ROOT'] : null;
     106
     107$backupino_state_base  = '';
     108$backupino_state_error = '';
     109if ( strlen( trim( $backupino_state_secret ) ) < 32 || ( '' !== $backupino_token && hash_equals( $backupino_token, $backupino_state_secret ) ) ) {
     110        $backupino_state_error = 'Installer server-side security secret is missing or invalid.';
     111} else {
     112        try {
     113                $backupino_state_base = State::find_secure_base_dir( $backupino_dir, $backupino_doc_root );
     114        } catch ( \RuntimeException $e ) {
     115                $backupino_state_error = $e->getMessage();
     116        }
     117}
    102118
    103119// Auto-detect current host and base URL
    … …  
    111127
    112128if ( 'index' === $backupino_action ) {
    113         $backupino_checks = Env::check( $backupino_payload, $backupino_dir, $backupino_archive );
     129        $backupino_checks   = Env::check( $backupino_payload, $backupino_dir, $backupino_archive );
     130        $backupino_checks[] = array(
     131                'label'  => 'Secure state storage',
     132                'ok'     => '' === $backupino_state_error && '' !== $backupino_state_base,
     133                'detail' => '' === $backupino_state_error
     134                        ? 'Private per-run storage outside web document root'
     135                        : $backupino_state_error,
     136        );
    114137        $backupino_body   = '<div id="app">
    115138        <section id="step1">
    … …  
    142165                                <span data-i18n="empty_db_lbl">Empty existing database tables before import (Recommended)</span>
    143166                        </label>
     167                        <div class="admin-box">
     168                                <label style="display:flex;align-items:center;gap:8px;margin:0;font-weight:600;cursor:pointer;">
     169                                        <input type="checkbox" id="create_admin" name="create_admin" value="1" style="width:auto;margin:0;">
     170                                        <span data-i18n="create_admin_opt">Create a new WordPress Administrator account (Optional)</span>
     171                                </label>
     172                                <div id="admin-fields" class="hidden" style="margin-top:12px;">
     173                                        <div class="grid">
     174                                                <div>
     175                                                        <label for="admin_user" data-i18n="admin_user_lbl">Administrator Username</label>
     176                                                        <input id="admin_user" name="admin_user" placeholder="admin">
     177                                                </div>
     178                                                <div>
     179                                                        <label for="admin_email" data-i18n="admin_email_lbl">Administrator Email</label>
     180                                                        <input id="admin_email" name="admin_email" type="email" placeholder="admin@example.com">
     181                                                </div>
     182                                        </div>
     183                                        <label for="admin_pass" data-i18n="admin_pass_lbl">Administrator Password</label>
     184                                        <div class="pass-wrap">
     185                                                <input id="admin_pass" name="admin_pass" type="password" placeholder="Enter secure password">
     186                                                <button type="button" class="pass-toggle-btn" id="toggle_admin_pass" data-i18n="show_btn">Show</button>
     187                                        </div>
     188                                </div>
     189                        </div>
    144190                        <p class="err" id="error2"></p>
    145191                        <div style="display:flex;gap:10px;align-items:center;margin-top:16px;">
    … …  
    164210                <h2 style="font-size:16px;margin:0 0 10px;color:#16a34a;" id="done-title" data-i18n="ready_title">&#10003; Your site is ready</h2>
    165211                <p class="lead" id="done-url" style="font-weight:600;word-break:break-all;"></p>
     212                <div id="admin-created-box" class="hidden" style="margin:14px 0;padding:12px 14px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;font-size:13px;color:#166534;">
     213                        <div style="font-weight:700;margin-bottom:4px;" data-i18n="admin_created_title">&#10003; New Administrator Account Created:</div>
     214                        <div><span data-i18n="admin_user_lbl">Username</span>: <strong id="admin-created-name"></strong></div>
     215                </div>
    166216                <div style="display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:16px;">
    167217                        <button type="button" id="cleanup" data-i18n="cleanup_btn" style="background:#16a34a;margin-top:0;">Delete installer files &amp; Login</button>
    … …  
    197247@set_time_limit( 180 );
    198248
    199 $backupino_state = new State( $backupino_state_file );
    200 
    201 // Optional password gate, configured when the package was built.
    202 $backupino_password = isset( $backupino_payload['password'] ) ? (string) $backupino_payload['password'] : '';
    203 
    204 if ( '' !== $backupino_password && ! $backupino_state->get( 'authenticated' ) ) {
    205         $backupino_supplied = isset( $_REQUEST['installer_password'] ) ? (string) $_REQUEST['installer_password'] : '';
    206 
    207         if ( ! hash_equals( $backupino_password, $backupino_supplied ) ) {
     249if ( '' !== $backupino_state_error || '' === $backupino_state_base ) {
     250        respond(
     251                array(
     252                        'ok'    => false,
     253                        'error' => '' !== $backupino_state_error
     254                                ? $backupino_state_error
     255                                : 'Secure temporary storage outside the web document root is unavailable. Installation stopped to protect sensitive credentials.',
     256                ),
     257                500
     258        );
     259}
     260
     261$backupino_password   = isset( $backupino_payload['password'] ) ? (string) $backupino_payload['password'] : '';
     262$backupino_run_handle = isset( $_POST['run_handle'] ) ? trim( (string) $_POST['run_handle'] ) : '';
     263if ( '' === $backupino_run_handle && isset( $_COOKIE['backupino_run'] ) ) {
     264        $backupino_run_handle = trim( (string) $_COOKIE['backupino_run'] );
     265}
     266
     267$backupino_state      = null;
     268$backupino_state_file = '';
     269
     270// Actions that require an already-created private run session fail closed on invalid/tampered state.
     271if ( in_array( $backupino_action, array( 'extract', 'import', 'rewrite', 'config' ), true ) ) {
     272        try {
     273                $backupino_state = State::open_private_run(
     274                        $backupino_run_handle,
     275                        $backupino_dir,
     276                        $backupino_state_secret,
     277                        $backupino_archive_name,
     278                        $backupino_doc_root
     279                );
     280        } catch ( \RuntimeException $e ) {
     281                respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), array(), '', $backupino_state_secret, $backupino_run_handle ) ), 400 );
     282        }
     283
     284        $backupino_state_file             = $backupino_state->file();
     285        $GLOBALS['backupino_active_state'] = $backupino_state;
     286
     287        if ( '' !== $backupino_password && ! $backupino_state->get( 'authenticated' ) ) {
    208288                respond( array( 'ok' => false, 'error' => 'Installer password required.' ), 401 );
    209289        }
    210 
    211         $backupino_state->set( 'authenticated', true );
    212         $backupino_state->save();
     290} elseif ( in_array( $backupino_action, array( 'abort', 'cleanup' ), true ) && '' !== $backupino_run_handle ) {
     291        try {
     292                $backupino_state                  = State::open_private_run(
     293                        $backupino_run_handle,
     294                        $backupino_dir,
     295                        $backupino_state_secret,
     296                        $backupino_archive_name,
     297                        $backupino_doc_root
     298                );
     299                $backupino_state_file             = $backupino_state->file();
     300                $GLOBALS['backupino_active_state'] = $backupino_state;
     301        } catch ( \RuntimeException $e ) {
     302                $backupino_state = null;
     303        }
    213304}
    214305
    … …  
    216307switch ( $backupino_action ) {
    217308        case 'check':
    218                 $checks = Env::check( $backupino_payload, $backupino_dir, $backupino_archive );
     309                $checks   = Env::check( $backupino_payload, $backupino_dir, $backupino_archive );
     310                $checks[] = array(
     311                        'label'  => 'Secure state storage',
     312                        'ok'     => '' === $backupino_state_error && '' !== $backupino_state_base,
     313                        'detail' => '' === $backupino_state_error
     314                                ? 'Private per-run storage outside web document root'
     315                                : $backupino_state_error,
     316                );
    219317
    220318                respond(
    … …  
    228326
    229327        case 'connect':
     328                if ( '' !== $backupino_password ) {
     329                        $backupino_supplied = isset( $_REQUEST['installer_password'] ) ? (string) $_REQUEST['installer_password'] : '';
     330                        if ( ! hash_equals( $backupino_password, $backupino_supplied ) ) {
     331                                respond( array( 'ok' => false, 'error' => 'Installer password required.' ), 401 );
     332                        }
     333                }
     334
    230335                $prefix = isset( $_POST['prefix'] ) && '' !== trim( (string) $_POST['prefix'] ) ? trim( (string) $_POST['prefix'] ) : 'wp_';
    231336                if ( ! preg_match( '/^[a-zA-Z0-9_]+$/', $prefix ) ) {
    … …  
    253358                }
    254359
     360                $create_admin  = ! empty( $_POST['create_admin'] );
     361                $admin_account = array();
     362                if ( $create_admin ) {
     363                        $admin_user  = isset( $_POST['admin_user'] ) ? trim( (string) $_POST['admin_user'] ) : '';
     364                        $admin_pass  = isset( $_POST['admin_pass'] ) ? (string) $_POST['admin_pass'] : '';
     365                        $admin_email = isset( $_POST['admin_email'] ) ? trim( (string) $_POST['admin_email'] ) : '';
     366
     367                        if ( '' === $admin_user || strlen( $admin_user ) > 60 ) {
     368                                respond( array( 'ok' => false, 'error' => 'Administrator username is required (max 60 characters).' ), 400 );
     369                        }
     370                        if ( '' === $admin_pass ) {
     371                                respond( array( 'ok' => false, 'error' => 'Administrator password is required.' ), 400 );
     372                        }
     373                        if ( '' === $admin_email || strlen( $admin_email ) > 100 || false === filter_var( $admin_email, FILTER_VALIDATE_EMAIL ) ) {
     374                                respond( array( 'ok' => false, 'error' => 'A valid administrator email address is required.' ), 400 );
     375                        }
     376
     377                        // Hash immediately so plaintext administrator password is never stored in state.
     378                        $admin_pass_hash = AdminCreator::hash_password( $admin_pass );
     379                        unset( $admin_pass );
     380
     381                        $admin_account = array(
     382                                'enabled'       => true,
     383                                'username'      => $admin_user,
     384                                'password_hash' => $admin_pass_hash,
     385                                'email'         => $admin_email,
     386                        );
     387                }
     388
    255389                try {
    256390                        $connection = ConnectionManager::ensure( $config );
    257391                } catch ( \RuntimeException $e ) {
    258                         respond( array( 'ok' => false, 'error' => $e->getMessage() ), 400 );
     392                        respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), $config, '', $backupino_state_secret, $backupino_run_handle ) ), 400 );
    259393                }
    260394
    … …  
    269403                }
    270404
     405                // Clean up any previous run handle from the same client before creating a fresh private run.
     406                if ( '' !== $backupino_run_handle ) {
     407                        try {
     408                                $prev_state = State::open_private_run(
     409                                        $backupino_run_handle,
     410                                        $backupino_dir,
     411                                        $backupino_state_secret,
     412                                        $backupino_archive_name,
     413                                        $backupino_doc_root
     414                                );
     415                                $prev_state->destroy();
     416                        } catch ( \RuntimeException $e ) {
     417                                // Ignore stale handle.
     418                        }
     419                }
     420
     421                try {
     422                        $backupino_state = State::create_private_run(
     423                                $backupino_dir,
     424                                $backupino_state_secret,
     425                                $backupino_archive_name,
     426                                $backupino_doc_root
     427                        );
     428                } catch ( \RuntimeException $e ) {
     429                        respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), $config, '', $backupino_state_secret ) ), 500 );
     430                }
     431
     432                $backupino_state_file              = $backupino_state->file();
     433                $backupino_run_handle              = $backupino_state->handle();
     434                $GLOBALS['backupino_active_state'] = $backupino_state;
     435
     436                if ( '' !== $backupino_password ) {
     437                        $backupino_state->set( 'authenticated', true );
     438                }
    271439                $backupino_state->set( 'db', $config );
    272440                $backupino_state->set( 'tables_found', count( $tables ) );
    273441                $backupino_state->set( 'new_url', $new_url );
    274442                $backupino_state->set( 'empty_db', ! empty( $_POST['empty_db'] ) );
    275                 $backupino_state->save();
     443                $backupino_state->set( 'admin_account', $admin_account );
     444                if ( ! $backupino_state->save() ) {
     445                        $backupino_state->destroy();
     446                        respond( array( 'ok' => false, 'error' => 'Failed to persist secure installer state.' ), 500 );
     447                }
     448
     449                if ( ! headers_sent() ) {
     450                        @setcookie(
     451                                'backupino_run',
     452                                $backupino_run_handle,
     453                                array(
     454                                        'expires'  => 0,
     455                                        'path'     => '' !== $backupino_subpath ? $backupino_subpath . '/' : '/',
     456                                        'secure'   => 'https' === $backupino_scheme,
     457                                        'httponly' => true,
     458                                        'samesite' => 'Strict',
     459                                )
     460                        );
     461                }
    276462
    277463                respond(
    … …  
    279465                                'ok'           => true,
    280466                                'db'           => $config['name'],
     467                                'run_handle'   => $backupino_run_handle,
    281468                                'message'      => sprintf( 'Database connected (%d tables existing).', count( $tables ) ),
    282469                                'tables_found' => count( $tables ),
    … …  
    287474        case 'extract':
    288475                if ( ! is_readable( $backupino_archive ) ) {
     476                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
    289477                        respond( array( 'ok' => false, 'error' => 'Archive file not found: ' . basename( $backupino_archive ) ), 400 );
    290478                }
    … …  
    292480                $extractor = new Extractor( $backupino_archive, $backupino_dir );
    293481                if ( ! $extractor->open() ) {
     482                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
    294483                        respond( array( 'ok' => false, 'error' => $extractor->error() ), 400 );
    295484                }
    … …  
    300489
    301490                $backupino_state->set( 'extract_offset', $offset );
    302                 $backupino_state->save();
     491                if ( ! $backupino_state->save() ) {
     492                        $extractor->close();
     493                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     494                        respond( array( 'ok' => false, 'error' => 'Failed to persist secure installer state.' ), 500 );
     495                }
    303496
    304497                $extractor->close();
    … …  
    354547                        $connection->query( 'SET UNIQUE_CHECKS = 0' );
    355548                } catch ( \RuntimeException $e ) {
    356                         respond( array( 'ok' => false, 'error' => $e->getMessage() ), 400 );
     549                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     550                        respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), $db, $backupino_state_file, $backupino_state_secret, $backupino_run_handle ) ), 400 );
    357551                }
    358552
    … …  
    390584
    391585                if ( ! empty( $result['error'] ) ) {
    392                         respond( array( 'ok' => false, 'error' => $result['error'] ), 500 );
     586                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     587                        respond( array( 'ok' => false, 'error' => sanitize_error_message( (string) $result['error'], $db, $backupino_state_file, $backupino_state_secret, $backupino_run_handle ) ), 500 );
    393588                }
    394589
    … …  
    453648                        $connection->query( 'SET UNIQUE_CHECKS = 0' );
    454649                } catch ( \RuntimeException $e ) {
    455                         respond( array( 'ok' => false, 'error' => $e->getMessage() ), 400 );
     650                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     651                        respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), $db, $backupino_state_file, $backupino_state_secret, $backupino_run_handle ) ), 400 );
    456652                }
    457653
    … …  
    476672
    477673        case 'config':
    478                 $db = $backupino_state->get( 'db' );
     674                $admin_created_username = '';
     675                $db                     = $backupino_state->get( 'db' );
    479676
    480677                if ( ! is_array( $db ) ) {
    … …  
    752949                                // Table might not exist yet, ignore.
    753950                        }
     951
     952                        // 5. Optional new WordPress Administrator account creation (INSERT-only; never modifies existing accounts)
     953                        $admin_account = (array) $backupino_state->get( 'admin_account' );
     954                        if ( ! empty( $admin_account['enabled'] ) && ! empty( $admin_account['username'] ) && ! empty( $admin_account['password_hash'] ) ) {
     955                                $adm_user      = trim( (string) $admin_account['username'] );
     956                                $adm_pass_hash = (string) $admin_account['password_hash'];
     957                                $adm_email     = trim( (string) ( $admin_account['email'] ?? '' ) );
     958
     959                                // Remove admin_account from state immediately before/on execution so it never lingers.
     960                                $backupino_state->remove( 'admin_account' );
     961                                $backupino_state->save();
     962
     963                                $created_admin          = AdminCreator::create( $connection, $target_prefix, $adm_user, $adm_email, $adm_pass_hash );
     964                                $admin_created_username = $created_admin['username'];
     965                        }
    754966                } catch ( \RuntimeException $e ) {
    755                         respond( array( 'ok' => false, 'error' => $e->getMessage() ), 400 );
     967                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     968                        respond( array( 'ok' => false, 'error' => sanitize_error_message( $e->getMessage(), $db, $backupino_state_file, $backupino_state_secret, $backupino_run_handle ) ), 400 );
    756969                }
    757970
    … …  
    776989                $db['new_url'] = $new_url;
    777990                if ( ! ConfigWriter::write( $backupino_dir . '/wp-config.php', $db, $orig_content ) ) {
     991                        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
    778992                        respond( array( 'ok' => false, 'error' => 'wp-config.php could not be written.' ), 500 );
    779993                }
    … …  
    8561070                        ? rtrim( $new_url, '/' ) . '/' . trim( $detected_login_slug, '/' ) . '/'
    8571071                        : rtrim( $new_url, '/' ) . '/wp-login.php';
    858 
    859                 $backupino_state->set( 'finished', true );
    860                 $backupino_state->save();
    8611072
    8621073                // Enqueue restore notification in WordPress options so it is dispatched cleanly via WordPress HTTP API on first boot
    … …  
    8991110                }
    9001111
     1112                // Purge all sensitive credentials & temporary SQL/config templates immediately upon completion.
     1113                $backupino_state->set( 'finished', true );
     1114                cleanup_sensitive_temp( $backupino_state, $backupino_dir, '' !== $backupino_password );
     1115
    9011116                respond(
    9021117                        array(
    903                                 'ok'      => true,
    904                                 'done'    => true,
    905                                 'percent' => 100,
    906                                 'url'     => $new_url,
    907                                 'admin'   => $admin_login_url,
    908                                 'message' => 'wp-config.php written.',
     1118                                'ok'            => true,
     1119                                'done'          => true,
     1120                                'percent'       => 100,
     1121                                'url'           => $new_url,
     1122                                'admin'         => $admin_login_url,
     1123                                'admin_created' => $admin_created_username,
     1124                                'message'       => 'wp-config.php written.',
    9091125                        )
    9101126                );
    9111127                break;
    9121128
     1129        case 'abort':
     1130                cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     1131                respond( array( 'ok' => true, 'aborted' => true ) );
     1132                break;
     1133
    9131134        case 'cleanup':
    914                 $backupino_state->destroy();
     1135                if ( '' !== $backupino_password ) {
     1136                        $cleanup_auth = ( $backupino_state instanceof State && ! empty( $backupino_state->get( 'authenticated' ) ) );
     1137                        if ( ! $cleanup_auth ) {
     1138                                $backupino_supplied = isset( $_REQUEST['installer_password'] ) ? (string) $_REQUEST['installer_password'] : '';
     1139                                if ( ! hash_equals( $backupino_password, $backupino_supplied ) ) {
     1140                                        respond( array( 'ok' => false, 'error' => 'Installer password required.' ), 401 );
     1141                                }
     1142                        }
     1143                }
     1144
     1145                if ( $backupino_state instanceof State ) {
     1146                        $backupino_state->destroy();
     1147                }
    9151148
    9161149                // Restore preserved destination host php configuration (.user.ini / php.ini) if valid
    … …  
    9331166                }
    9341167
     1168                // Delete ONLY exact known Backupino installer artifacts (never unrelated user files or archives).
    9351169                $targets = array(
    9361170                        $backupino_dir . '/database.sql',
    … …  
    9381172                        $backupino_dir . '/backupino-package.json',
    9391173                        $backupino_dir . '/backupino-wp-config.tpl',
    940                         $backupino_state_file,
    941                         $backupino_archive,
     1174                        $backupino_dir . '/backupino-install.json',
    9421175                        $backupino_dir . '/wp-config.backupino-orig.php',
    9431176                        $backupino_dir . '/.htaccess.backupino-orig',
    … …  
    9461179                );
    9471180
    948                 $dir_files = @scandir( $backupino_dir );
    949                 if ( is_array( $dir_files ) ) {
    950                         foreach ( $dir_files as $f ) {
    951                                 if ( '.' === $f || '..' === $f ) {
    952                                         continue;
    953                                 }
    954                                 $fpath = $backupino_dir . '/' . $f;
    955                                 if ( ! is_file( $fpath ) ) {
    956                                         continue;
    957                                 }
    958                                 if ( preg_match( '/\.(zip|sql|ndjson)$/i', $f ) ) {
    959                                         if (
    960                                                 0 === strpos( $f, 'backupino' ) ||
    961                                                 ( '' !== $backupino_archive_name && $f === $backupino_archive_name ) ||
    962                                                 preg_match( '/^[a-zA-Z0-9_\.\-]+_\d{8}_\d{6}\.zip$/', $f )
    963                                         ) {
    964                                                 $targets[] = $fpath;
    965                                         }
    966                                 }
    967                         }
     1181                if ( '' !== $backupino_archive_name ) {
     1182                        $targets[] = $backupino_archive;
    9681183                }
    9691184
    9701185                $targets = array_unique( $targets );
    9711186                foreach ( $targets as $target ) {
    972                         if ( is_file( $target ) ) {
    973                                 @chmod( $target, 0777 );
     1187                        if ( '' !== $target && is_file( $target ) ) {
     1188                                @chmod( $target, 0600 );
    9741189                                @unlink( $target );
    9751190                        }
    … …  
    9941209}
    9951210} catch ( \Throwable $backupino_err ) {
    996         respond( array( 'ok' => false, 'error' => $backupino_err->getMessage() ), 500 );
     1211        $backupino_db_ctx = ( $backupino_state instanceof State && is_array( $backupino_state->get( 'db' ) ) )
     1212                ? (array) $backupino_state->get( 'db' )
     1213                : array();
     1214        cleanup_sensitive_temp( $backupino_state, $backupino_dir, false );
     1215        respond(
     1216                array(
     1217                        'ok'    => false,
     1218                        'error' => sanitize_error_message( $backupino_err->getMessage(), $backupino_db_ctx, $backupino_state_file, $backupino_state_secret, $backupino_run_handle ),
     1219                ),
     1220                500
     1221        );
     1222}
     1223
     1224/**
     1225 * Clean up sensitive installer state and temporary extracted files without
     1226 * deleting unrelated user files, other runs, or backup archives.
     1227 *
     1228 * @param State|null $state          Active installer state.
     1229 * @param string     $dir            Installer working directory.
     1230 * @param bool       $keep_auth_flag Preserve minimal non-sensitive auth flag when installer password is active.
     1231 * @return void
     1232 */
     1233function cleanup_sensitive_temp( ?State $state, string $dir, bool $keep_auth_flag = false ): void {
     1234        if ( $state instanceof State ) {
     1235                $state->purge_sensitive( $keep_auth_flag );
     1236        }
     1237
     1238        $sensitive_temp = array(
     1239                $dir . '/database.sql',
     1240                $dir . '/backupino-wp-config.tpl',
     1241                $dir . '/backupino-install.json',
     1242        );
     1243
     1244        foreach ( $sensitive_temp as $path ) {
     1245                if ( is_file( $path ) ) {
     1246                        @chmod( $path, 0600 );
     1247                        @unlink( $path );
     1248                }
     1249        }
     1250}
     1251
     1252/**
     1253 * Strip sensitive credentials, server secrets, session handles, or private
     1254 * filesystem paths from error messages before sending them in HTTP JSON responses.
     1255 *
     1256 * @param string               $message      Raw error message.
     1257 * @param array<string, mixed> $db_config    Database config context.
     1258 * @param string               $state_file   Private state file path.
     1259 * @param string               $state_secret Server-only state secret.
     1260 * @param string               $run_handle   Signed session handle.
     1261 * @return string
     1262 */
     1263function sanitize_error_message(
     1264        string $message,
     1265        array $db_config = array(),
     1266        string $state_file = '',
     1267        string $state_secret = '',
     1268        string $run_handle = ''
     1269): string {
     1270        $secrets = array();
     1271
     1272        if ( ! empty( $db_config['password'] ) && is_string( $db_config['password'] ) ) {
     1273                $secrets[] = $db_config['password'];
     1274        }
     1275        if ( '' !== $state_secret ) {
     1276                $secrets[] = $state_secret;
     1277        }
     1278        if ( '' !== $run_handle ) {
     1279                $secrets[] = $run_handle;
     1280        }
     1281        if ( '' !== $state_file ) {
     1282                $secrets[] = $state_file;
     1283                $secrets[] = dirname( $state_file );
     1284                $secrets[] = dirname( dirname( $state_file ) );
     1285        }
     1286
     1287        foreach ( $secrets as $secret ) {
     1288                if ( '' !== $secret && '/' !== $secret ) {
     1289                        $message = str_replace( $secret, '[redacted]', $message );
     1290                }
     1291        }
     1292
     1293        return $message;
    9971294}
    9981295
  • backupino/trunk/src/Support/Fs.php

    r3800274 r3809656  
    4949
    5050        /**
    51          * Drop `.htaccess`, `web.config`, and `index.php` guards into a directory.
     51         * Drop `.htaccess`, `web.config`, and `index.html` guards into a directory.
    5252         *
    5353         * @param string $dir Absolute directory path.
  • backupino/trunk/templates/dashboard.php

    r3800274 r3809656  
    5757                                <?php endforeach; ?>
    5858                        </ul>
     59                        <?php if ( \Backupino\Core\Compatibility::is_nginx() ) : ?>
     60                                <?php $backupino_nginx = \Backupino\Core\Compatibility::nginx_storage_info( $paths ); ?>
     61                                <p style="margin: 8px 0 6px;">
     62                                        <strong><?php esc_html_e( 'Nginx Server Configuration Note:', 'backupino' ); ?></strong>
     63                                        <?php esc_html_e( 'Backupino cannot automatically alter or reload Nginx configuration. Direct HTTP access is not blocked until your server administrator applies the server rule.', 'backupino' ); ?>
     64                                </p>
     65                                <?php if ( 'exact' === $backupino_nginx['status'] && '' !== $backupino_nginx['rule'] ) : ?>
     66                                        <p style="margin: 0 0 6px;">
     67                                                <strong><?php esc_html_e( 'Required Nginx server configuration (add inside your server { } block and reload Nginx):', 'backupino' ); ?></strong>
     68                                        </p>
     69                                        <pre class="code" style="margin: 0 0 10px; padding: 10px; background: #fff; border: 1px solid #dcdcde; overflow-x: auto; direction: ltr; text-align: left;"><?php echo esc_html( $backupino_nginx['rule'] ); ?></pre>
     70                                <?php else : ?>
     71                                        <p class="description" style="margin: 0 0 10px;">
     72                                                <?php esc_html_e( 'The storage path cannot be resolved to an automatic Nginx location (for example, due to an external CDN, custom domain, or path outside webroot). Please see Backupino -> Settings -> Storage Destination to manually determine the rule for your server.', 'backupino' ); ?>
     73                                        </p>
     74                                <?php endif; ?>
     75                        <?php endif; ?>
    5976                </div>
    6077        <?php endif; ?>
  • backupino/trunk/templates/settings.php

    r3800274 r3809656  
    210210                                                </h3>
    211211                                                <p class="description">
    212                                                         <?php esc_html_e( 'Isolated, protected path used to safely store archive files away from public access:', 'backupino' ); ?>
     212                                                        <?php esc_html_e( 'Local directory used to store backup archives. Guarded with .htaccess (Apache/LiteSpeed), web.config (IIS), and index.html (directory listing). On Nginx, direct HTTP access is NOT guaranteed to be blocked until a server-level deny rule is configured.', 'backupino' ); ?>
    213213                                                </p>
    214214                                                <div class="backupino-path-box">
    … …  
    220220                                                </div>
    221221                                                <p class="backupino-result" id="backupino-storage-result" style="margin-top: 8px;"></p>
     222                                                <?php if ( ! empty( $backupino_snapshot['is_nginx'] ) ) : ?>
     223                                                        <div class="notice notice-warning inline" style="margin: 12px 0 0;">
     224                                                                <p>
     225                                                                        <strong><?php esc_html_e( 'Nginx detected — manual server configuration required:', 'backupino' ); ?></strong>
     226                                                                        <?php esc_html_e( 'Nginx ignores .htaccess and web.config. Backupino cannot automatically alter or reload Nginx configuration. Direct HTTP downloads of package URLs are not guaranteed to be blocked until your server administrator adds the rule below inside your Nginx server { } block and reloads Nginx.', 'backupino' ); ?>
     227                                                                </p>
     228                                                                <?php if ( ! empty( $backupino_snapshot['nginx_rule'] ) ) : ?>
     229                                                                        <pre class="code" style="margin: 6px 0 10px; padding: 10px; background: #fff; border: 1px solid #dcdcde; overflow-x: auto; direction: ltr; text-align: left;"><?php echo esc_html( (string) $backupino_snapshot['nginx_rule'] ); ?></pre>
     230                                                                <?php else : ?>
     231                                                                        <p class="description" style="margin: 6px 0;">
     232                                                                                <?php esc_html_e( 'The exact Nginx location block cannot be determined automatically (e.g. external CDN or custom mapping). Please visit Backupino -> Settings -> Storage Destination to view manual configuration guidance.', 'backupino' ); ?>
     233                                                                        </p>
     234                                                                <?php endif; ?>
     235                                                        </div>
     236                                                <?php endif; ?>
    222237                                        </div>
    223238
    … …  
    318333                                                        </h2>
    319334                                                        <p class="description">
    320                                                                 <?php esc_html_e( 'Backup archives and standalone installers are stored locally in a secure, protected directory on your server.', 'backupino' ); ?>
     335                                                                <?php esc_html_e( 'Backup archives are stored locally on your server and served to administrators through Backupino authenticated download endpoints.', 'backupino' ); ?>
    321336                                                        </p>
    322337
    … …  
    324339                                                                <label class="backupino-label">
    325340                                                                        <span class="backupino-label-text"><?php esc_html_e( 'Primary Destination Driver', 'backupino' ); ?></span>
    326                                                                         <span class="backupino-tooltip" data-tooltip="<?php esc_attr_e( 'Primary storage destination for completed packages. Local protected storage is used.', 'backupino' ); ?>" tabindex="0">?</span>
     341                                                                        <span class="backupino-tooltip" data-tooltip="<?php esc_attr_e( 'Primary storage destination for completed packages.', 'backupino' ); ?>" tabindex="0">?</span>
    327342                                                                </label>
    328343                                                                <select name="storage.driver" id="backupino-driver">
    … …  
    338353                                                        <div class="backupino-field-group" style="margin-top: 16px;">
    339354                                                                <label class="backupino-label">
    340                                                                         <span class="backupino-label-text"><?php esc_html_e( 'Protected Directory Path', 'backupino' ); ?></span>
     355                                                                        <span class="backupino-label-text"><?php esc_html_e( 'Storage Directory Path', 'backupino' ); ?></span>
    341356                                                                </label>
    342357                                                                <input type="text" readonly class="large-text code" value="<?php echo esc_attr( $paths->packages() ); ?>">
    343358                                                                <p class="description">
    344                                                                         <?php esc_html_e( 'This location contains an .htaccess file blocking direct HTTP requests and indexing for maximum security.', 'backupino' ); ?>
     359                                                                        <?php esc_html_e( 'Backupino places .htaccess (Apache/LiteSpeed), web.config (IIS), and index.html (hides directory listing only) in this directory. Nginx ignores .htaccess and web.config; direct HTTP access is NOT guaranteed to be blocked on Nginx until you add a server-level deny rule.', 'backupino' ); ?>
    345360                                                                </p>
     361                                                        </div>
     362
     363                                                        <?php if ( ! empty( $backupino_snapshot['is_nginx'] ) ) : ?>
     364                                                                <div class="notice notice-warning inline" style="margin: 16px 0 0;">
     365                                                                        <p>
     366                                                                                <strong><?php esc_html_e( 'Nginx Server Detected — Action Required to Block Direct Access:', 'backupino' ); ?></strong>
     367                                                                                <?php esc_html_e( 'Nginx does not enforce .htaccess or web.config rules, and index.html only conceals directory listings. Action is required by your server administrator to prevent direct HTTP downloads of backup files.', 'backupino' ); ?>
     368                                                                        </p>
     369                                                                </div>
     370                                                        <?php endif; ?>
     371
     372                                                        <!-- Permanent Informational Card for Web Server Protection & Nginx Guidance -->
     373                                                        <div class="backupino-card" style="margin-top: 18px; padding: 18px; border: 1px solid var(--backupino-border); border-radius: 10px; background: #fff;">
     374                                                                <h3 style="margin: 0 0 10px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px;">
     375                                                                        <span class="dashicons dashicons-shield"></span>
     376                                                                        <span><?php esc_html_e( 'Web Server Direct Access Protection & Nginx Guidance', 'backupino' ); ?></span>
     377                                                                </h3>
     378                                                                <p class="description" style="margin: 0 0 10px;">
     379                                                                        <?php esc_html_e( 'Backupino automatically creates .htaccess (for Apache/LiteSpeed) and web.config (for Microsoft IIS) files inside the storage directory to block direct HTTP requests. An index.html file is also placed to hide directory browsing, but it cannot prevent direct downloads if an attacker knows or guesses the file name.', 'backupino' ); ?>
     380                                                                </p>
     381                                                                <p class="description" style="margin: 0 0 12px;">
     382                                                                        <strong><?php esc_html_e( 'Nginx & Reverse Proxy Limitations:', 'backupino' ); ?></strong>
     383                                                                        <?php esc_html_e( 'Nginx completely ignores .htaccess and web.config files. Because reverse proxies or front-end caches may sit in front of Apache or PHP-FPM, automated web server detection is best-effort and cannot be guaranteed in every architecture. Backupino cannot automatically modify or reload Nginx configuration files.', 'backupino' ); ?>
     384                                                                </p>
     385                                                                <div style="background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; margin-bottom: 8px;">
     386                                                                        <h4 style="margin: 0 0 8px; font-size: 14px; font-weight: 600;">
     387                                                                                <?php esc_html_e( 'Server Administrator Nginx Configuration', 'backupino' ); ?>
     388                                                                        </h4>
     389                                                                        <p style="margin: 0 0 8px; font-size: 13px;">
     390                                                                                <?php esc_html_e( 'Direct HTTP access to backup package URLs is NOT guaranteed to be blocked on Nginx until your server administrator adds the deny rule below inside your Nginx server { } block and reloads Nginx. Merely viewing this rule in the admin panel does not activate it.', 'backupino' ); ?>
     391                                                                        </p>
     392                                                                        <?php
     393                                                                        $backupino_nginx_info = $backupino_snapshot['nginx_storage_info'] ?? \Backupino\Core\Compatibility::nginx_storage_info( $paths );
     394                                                                        if ( 'exact' === $backupino_nginx_info['status'] && ! empty( $backupino_nginx_info['rule'] ) ) :
     395                                                                        ?>
     396                                                                                <p style="margin: 0 0 6px; font-size: 13px; font-weight: 600;">
     397                                                                                        <?php esc_html_e( 'Add this directive inside your Nginx server { } block:', 'backupino' ); ?>
     398                                                                                </p>
     399                                                                                <pre class="code" style="margin: 0 0 8px; padding: 10px; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; overflow-x: auto; direction: ltr; text-align: left; font-size: 13px;"><?php echo esc_html( (string) $backupino_nginx_info['rule'] ); ?></pre>
     400                                                                        <?php else : ?>
     401                                                                                <div style="padding: 10px; background: #fff; border-left: 4px solid #f59e0b; border: 1px solid #cbd5e1; border-radius: 6px; margin: 0 0 8px;">
     402                                                                                        <p style="margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #b45309;">
     403                                                                                                <?php esc_html_e( 'Manual Nginx Rule Configuration Required', 'backupino' ); ?>
     404                                                                                        </p>
     405                                                                                        <p class="description" style="margin: 0 0 6px;">
     406                                                                                                <?php
     407                                                                                                if ( 'cdn' === ( $backupino_nginx_info['reason'] ?? '' ) ) {
     408                                                                                                        esc_html_e( 'Your WordPress uploads directory uses an external CDN or separate domain. The exact public Nginx location cannot be determined automatically. Your server administrator must manually create an Nginx location block matching your origin server URL mapping.', 'backupino' );
     409                                                                                                } else {
     410                                                                                                        esc_html_e( 'The backup storage directory is located outside standard web root or uses a custom path mapping. Your server administrator must manually configure an Nginx rule denying direct access based on your web server configuration.', 'backupino' );
     411                                                                                                }
     412                                                                                                ?>
     413                                                                                        </p>
     414                                                                                        <p class="description" style="margin: 0;">
     415                                                                                                <?php
     416                                                                                                /* translators: %s: Filesystem path of the storage directory. */
     417                                                                                                printf( esc_html__( 'Target filesystem path: %s', 'backupino' ), '<code>' . esc_html( $paths->packages() ) . '</code>' );
     418                                                                                                ?>
     419                                                                                        </p>
     420                                                                                </div>
     421                                                                        <?php endif; ?>
     422                                                                        <p class="description" style="margin: 0;">
     423                                                                                <?php esc_html_e( 'After adding the rule, test with `nginx -t` and reload Nginx. Authorized downloads through Backupino admin or the permanent download link continue to work normally through PHP.', 'backupino' ); ?>
     424                                                                        </p>
     425                                                                </div>
    346426                                                        </div>
    347427                                                </div>
  • backupino/trunk/uninstall.php

    r3800274 r3809656  
    1616// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_operations_chmod -- Recursive uninstall permissions handling.
    1717
    18 /**
    19  * Recursively remove a directory and all its contents.
    20  *
    21  * @param string $dir Target directory.
    22  * @return void
    23  */
    24 function backupino_remove_directory( string $dir ): void {
    25         if ( ! is_dir( $dir ) ) {
    26                 return;
     18if ( ! function_exists( 'backupino_remove_directory' ) ) {
     19        /**
     20         * Recursively remove a directory and all its contents.
     21         *
     22         * Defensively handles symbolic links: if the target directory itself is a symlink,
     23         * only the symlink is removed without traversing, altering permissions, or deleting
     24         * the destination target. During traversal, symlinks (to files or directories) are
     25         * identified before directory checks and unlinked directly without following them.
     26         *
     27         * @param string $dir Target directory.
     28         * @return void
     29         */
     30        function backupino_remove_directory( string $dir ): void {
     31                $target = rtrim( $dir, '/\\' );
     32                if ( '' === $target ) {
     33                        return;
     34                }
     35
     36                // 1. If the root target path is a symbolic link, remove only the link itself.
     37                // Never traverse, chmod, or remove the destination directory.
     38                if ( is_link( $target ) ) {
     39                        if ( ! @unlink( $target ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     40                                @rmdir( $target );        // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     41                        }
     42                        return;
     43                }
     44
     45                if ( ! is_dir( $target ) ) {
     46                        return;
     47                }
     48
     49                // Ensure symlinks are never followed during traversal (SKIP_DOTS only, no FOLLOW_SYMLINKS).
     50                $flags = FilesystemIterator::SKIP_DOTS;
     51
     52                try {
     53                        $dir_iterator = new RecursiveDirectoryIterator( $target, $flags );
     54                        $items        = new RecursiveIteratorIterator( $dir_iterator, RecursiveIteratorIterator::CHILD_FIRST );
     55
     56                        foreach ( $items as $item ) {
     57                                $path = $item->getPathname();
     58
     59                                // 2. Identify symlinks BEFORE checking if directory.
     60                                // If entry is a symlink (to a file or directory), unlink only the link itself.
     61                                if ( $item->isLink() || is_link( $path ) ) {
     62                                        if ( ! @unlink( $path ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     63                                                @rmdir( $path );        // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     64                                        }
     65                                        continue;
     66                                }
     67
     68                                if ( $item->isDir() ) {
     69                                        @chmod( $path, 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     70                                        @rmdir( $path );       // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     71                                } else {
     72                                        @chmod( $path, 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     73                                        @unlink( $path );      // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     74                                }
     75                        }
     76                } catch ( UnexpectedValueException $e ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch
     77                        // Fail-safe if directory cannot be opened.
     78                }
     79
     80                @chmod( $target, 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
     81                @rmdir( $target );       // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    2782        }
    28 
    29         $items = new RecursiveIteratorIterator(
    30                 new RecursiveDirectoryIterator( $dir, FilesystemIterator::SKIP_DOTS ),
    31                 RecursiveIteratorIterator::CHILD_FIRST
    32         );
    33 
    34         foreach ( $items as $item ) {
    35                 if ( $item->isDir() ) {
    36                         @chmod( $item->getPathname(), 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    37                         @rmdir( $item->getPathname() );       // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    38                 } else {
    39                         @chmod( $item->getPathname(), 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    40                         @unlink( $item->getPathname() );      // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    41                 }
    42         }
    43 
    44         @chmod( $dir, 0777 ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    45         @rmdir( $dir );       // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    4683}
    4784
    48 /**
    49  * Remove every trace of the plugin for the current site.
    50  *
    51  * @return void
    52  */
    53 function backupino_uninstall_site(): void {
    54         global $wpdb;
     85if ( ! function_exists( 'backupino_uninstall_site' ) ) {
     86        /**
     87         * Remove every trace of the plugin for the current site.
     88         *
     89         * @return void
     90         */
     91        function backupino_uninstall_site(): void {
     92                global $wpdb;
    5593
    56         // Drop custom database tables
    57         // phpcs:ignore WordPress.DB.DirectDatabaseQuery
    58         $wpdb->query( 'DROP TABLE IF EXISTS `' . $wpdb->prefix . 'backupino_jobs`' );
     94                // Drop custom database tables
     95                // phpcs:ignore WordPress.DB.DirectDatabaseQuery
     96                $wpdb->query( 'DROP TABLE IF EXISTS `' . $wpdb->prefix . 'backupino_jobs`' );
    5997
    60         // Delete all stored options
    61         delete_option( 'backupino_settings' );
    62         delete_option( 'backupino_schema_version' );
    63         delete_option( 'backupino_schedule_state' );
    64         delete_option( 'backupino_installed_at' );
    65         delete_option( 'backupino_download_key' );
    66         delete_option( 'backupino_notify_queue' );
    67         delete_option( 'backupino_migration_notice' );
     98                // Delete all stored options
     99                delete_option( 'backupino_settings' );
     100                delete_option( 'backupino_schema_version' );
     101                delete_option( 'backupino_schedule_state' );
     102                delete_option( 'backupino_installed_at' );
     103                delete_option( 'backupino_download_key' );
     104                delete_option( 'backupino_notify_queue' );
     105                delete_option( 'backupino_migration_notice' );
    68106
    69         // Clear scheduled cron events
    70         wp_clear_scheduled_hook( 'backupino_run_jobs' );
    71         wp_clear_scheduled_hook( 'backupino_scheduled_backup' );
     107                // Clear scheduled cron events (current and legacy hooks)
     108                $backupino_cron_hooks = array(
     109                        'backupino_run_jobs',
     110                        'backupino_scheduled_backup',
     111                        'backupino_cron_worker',
     112                        'backupino_cron_scheduler',
     113                        'backupino_cron_queue',
     114                        'backupino_cron_retention',
     115                );
     116                foreach ( $backupino_cron_hooks as $backupino_hook ) {
     117                        wp_clear_scheduled_hook( $backupino_hook );
     118                }
    72119
    73         // Remove storage directories in uploads and legacy wp-content/backupino
    74         $backupino_uploads = wp_upload_dir( null, false );
    75         if ( ! empty( $backupino_uploads['basedir'] ) ) {
    76                 $backupino_primary_dir = rtrim( (string) $backupino_uploads['basedir'], '/' ) . '/backupino';
    77                 backupino_remove_directory( $backupino_primary_dir );
    78         }
     120                // Remove storage directories in uploads and legacy wp-content/backupino
     121                $backupino_uploads = wp_upload_dir( null, false );
     122                if ( ! empty( $backupino_uploads['basedir'] ) ) {
     123                        $backupino_primary_dir = rtrim( (string) $backupino_uploads['basedir'], '/' ) . '/backupino';
     124                        backupino_remove_directory( $backupino_primary_dir );
     125                }
    79126
    80         $backupino_content_dir = defined( 'WP_CONTENT_DIR' ) ? (string) WP_CONTENT_DIR : ( (string) ABSPATH . 'wp-content' );
    81         $backupino_legacy_dir  = rtrim( $backupino_content_dir, '/' ) . '/backupino';
    82         if ( is_dir( $backupino_legacy_dir ) ) {
    83                 backupino_remove_directory( $backupino_legacy_dir );
     127                $backupino_content_dir = defined( 'WP_CONTENT_DIR' ) ? (string) WP_CONTENT_DIR : ( (string) ABSPATH . 'wp-content' );
     128                $backupino_legacy_dir  = rtrim( $backupino_content_dir, '/' ) . '/backupino';
     129                if ( is_dir( $backupino_legacy_dir ) || is_link( $backupino_legacy_dir ) ) {
     130                        backupino_remove_directory( $backupino_legacy_dir );
     131                }
    84132        }
    85133}
    86134
    87135if ( is_multisite() ) {
    88         $backupino_sites = get_sites( array( 'fields' => 'ids' ) );
     136        $backupino_sites = get_sites(
     137                array(
     138                        'fields' => 'ids',
     139                        'number' => 0,
     140                )
     141        );
    89142
    90143        foreach ( $backupino_sites as $backupino_site_id ) {
Note: See TracChangeset for help on using the changeset viewer.