diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 0f289757..d8f50136 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -1,6 +1,9 @@ #!/bin/sh +export PATH="$PATH:$HOME/.composer/vendor/bin" ln -s ./conf.sample.php cfg/conf.php composer install --no-dev --optimize-autoloader + sudo chmod a+x "$(pwd)" && sudo rm -rf /var/www/html && sudo ln -s "$(pwd)" /var/www/html + npm install --global nyc diff --git a/CHANGELOG.md b/CHANGELOG.md index 45316680..f84060dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * CHANGED: Simpler PostgreSQL table lookup query (#1361) * CHANGED: SRI hashes are now configurable, no longer hardcoded in templates (#1365) * CHANGED: Upgrading libraries to: DOMpurify 3.1.6 +* ADDED: Show a button (that redirects to the `basepath` URL) inside the alert after a paste is deleted ## 1.7.4 (2024-07-09) * CHANGED: Saving markdown pastes uses `.md` extension instead of `.txt` (#1293) diff --git a/bin/migrate b/bin/migrate index 51aa8f75..79b0ad15 100755 --- a/bin/migrate +++ b/bin/migrate @@ -200,9 +200,9 @@ Options: -h, --help displays this help message -n dry run, do not copy data -v be verbose - use storage backend configration from conf.php found in + use storage backend configuration from conf.php found in this directory as source - optionally, use storage backend configration from conf.php + optionally, use storage backend configuration from conf.php found in this directory as destination; defaults to: " . PATH . "cfg" . DIRECTORY_SEPARATOR . "conf.php "); diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php index b1279d81..e9880471 100644 --- a/cfg/conf.sample.php +++ b/cfg/conf.sample.php @@ -280,5 +280,4 @@ dir = PATH "data" ; Subresource integrity (SRI) hashes used in template files. Uncomment and set ; these for all js files used. See: ; https://github.com/PrivateBin/PrivateBin/wiki/FAQ#user-content-how-to-make-privatebin-work-when-i-have-changed-some-javascript-files -;privatebin.js = "sha512-[…]" - +;js/privatebin.js = "sha512-[…]" diff --git a/doc/Running Unit Tests.md b/doc/Running Unit Tests.md index 95078258..1a5770bc 100644 --- a/doc/Running Unit Tests.md +++ b/doc/Running Unit Tests.md @@ -43,6 +43,14 @@ Example for Debian and Ubuntu: $ sudo apt install phpunit php-gd php-sqlite3 php-xdebug ``` +Because the unit tests depend on this, you also need to install the optional. Otherwise they won't run: +```console +composer require google/cloud-storage +``` + +If you do this and want to develop further, please go into `.gitignore` and adjust it to ignore the whole +vendor directory. Otherwise your `git status` will be filled with lot's of unrelated PHP files. + To run the tests, change into the `tst` directory and run phpunit: ```console diff --git a/i18n/ar.json b/i18n/ar.json index 5fffac70..66138b38 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -219,5 +219,6 @@ "Yes, see it": "نعم، حمله", "Dark Mode": "الوضع الداكن", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/bg.json b/i18n/bg.json index 44b669a2..14194e0c 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/ca.json b/i18n/ca.json index fca160e7..fbfb6bb6 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error de compressió de la nota, no hi ha suport de WebAssembly.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/co.json b/i18n/co.json index d59bdb22..55ba126a 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -219,5 +219,6 @@ "Yes, see it": "Iè, fighjallu", "Dark Mode": "Modu scuru", "Error compressing paste, due to missing WebAssembly support.": "Sbagliu durante a cumpressione di l’appiccicu, perchè WebAssembly ùn hè micca accettatu.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Sbagliu durante a scumpressione di l’appiccicu, perchè u vostru navigatore ùn accetteghja micca WebAssembly. Ci vole à impiegà un altru navigatore per affissà st’appiccicu." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Sbagliu durante a scumpressione di l’appiccicu, perchè u vostru navigatore ùn accetteghja micca WebAssembly. Ci vole à impiegà un altru navigatore per affissà st’appiccicu.", + "Start over": "Start over" } diff --git a/i18n/cs.json b/i18n/cs.json index 052d9cbc..b81f0f7c 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -219,5 +219,6 @@ "Yes, see it": "Ano, zobrazit", "Dark Mode": "Tmavý režim", "Error compressing paste, due to missing WebAssembly support.": "Chyba při komprimování příspěvku kvůli chybějící podpoře WebAssembly.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Chyba při dekomprimování příspěvku, váš prohlížeč nepodporuje WebAssembly. Pro zobrazení tohoto příspěvku prosím použijte jiný prohlížeč." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Chyba při dekomprimování příspěvku, váš prohlížeč nepodporuje WebAssembly. Pro zobrazení tohoto příspěvku prosím použijte jiný prohlížeč.", + "Start over": "Start over" } diff --git a/i18n/de.json b/i18n/de.json index 8bc311bd..6f2bcaab 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -219,5 +219,6 @@ "Yes, see it": "Ja, jetzt einsehen", "Dark Mode": "Nachtmodus", "Error compressing paste, due to missing WebAssembly support.": "Fehler beim Komprimieren des Textes, da WebAssembly-Unterstützung fehlt.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fehler beim Dekomprimieren des Textes. Dein Browser unterstützt WebAssembly nicht. Bitte verwende einen anderen Browser, um diesen Text anzuzeigen." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fehler beim Dekomprimieren des Textes. Dein Browser unterstützt WebAssembly nicht. Bitte verwende einen anderen Browser, um diesen Text anzuzeigen.", + "Start over": "Start over" } diff --git a/i18n/el.json b/i18n/el.json index 746b4dc5..07f81d7a 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -219,5 +219,6 @@ "Yes, see it": "Ναι, δείτε το", "Dark Mode": "Σκοτεινό Θέμα", "Error compressing paste, due to missing WebAssembly support.": "Σφάλμα συμπίεσης επικόλλησης, λόγω έλλειψης υποστήριξης WebAssembly.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Σφάλμα αποσυμπίεσης της επικόλλησης, ο περιηγητής σας δεν υποστηρίζει WebAssembly. Παρακαλούμε χρησιμοποιήστε έναν άλλο περιηγητή για να δείτε αυτή την επικόλληση." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Σφάλμα αποσυμπίεσης της επικόλλησης, ο περιηγητής σας δεν υποστηρίζει WebAssembly. Παρακαλούμε χρησιμοποιήστε έναν άλλο περιηγητή για να δείτε αυτή την επικόλληση.", + "Start over": "Start over" } diff --git a/i18n/en.json b/i18n/en.json index 64bc773f..abc2e80a 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/es.json b/i18n/es.json index ea96caa9..40b63dfb 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -219,5 +219,6 @@ "Yes, see it": "Sí, verlo", "Dark Mode": "Modo nocturno", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/et.json b/i18n/et.json index b58ece48..3d21e4fe 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Tume režiim", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/fi.json b/i18n/fi.json index 3341555a..de5742a4 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -219,5 +219,6 @@ "Yes, see it": "Kyllä, näet sen", "Dark Mode": "Tumma tila", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/fr.json b/i18n/fr.json index e4676f2e..93feec36 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -219,5 +219,6 @@ "Yes, see it": "Oui, le voir", "Dark Mode": "Mode Sombre", "Error compressing paste, due to missing WebAssembly support.": "Erreur lors de la compression du paste, en raison du support de WebAssembly manquant.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Erreur lors de la décompression du paste, votre navigateur ne supporte pas WebAssembly. Veuillez utiliser un autre navigateur pour voir ce paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Erreur lors de la décompression du paste, votre navigateur ne supporte pas WebAssembly. Veuillez utiliser un autre navigateur pour voir ce paste.", + "Start over": "Start over" } diff --git a/i18n/he.json b/i18n/he.json index 22a0af1b..b32f3b8e 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/hi.json b/i18n/hi.json index 64bc773f..abc2e80a 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/hu.json b/i18n/hu.json index 3f232d97..ed652a53 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Sötét mód", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/id.json b/i18n/id.json index e4387f95..62f94a98 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Mode Gelap", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/it.json b/i18n/it.json index d972a8c5..8aa5aedf 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -219,5 +219,6 @@ "Yes, see it": "Sì, visualizzalo", "Dark Mode": "Tema Scuro", "Error compressing paste, due to missing WebAssembly support.": "Errore nella compressione dell messaggio, a causa del supporto WebAssembly mancante.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Errore nella decompressione dell messaggio, il tuo browser non supporta WebAssembly. Utilizza un altro browser per visualizzare questo messaggio." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Errore nella decompressione dell messaggio, il tuo browser non supporta WebAssembly. Utilizza un altro browser per visualizzare questo messaggio.", + "Start over": "Start over" } diff --git a/i18n/ja.json b/i18n/ja.json index 48f91a72..528097d5 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -219,5 +219,6 @@ "Yes, see it": "はい、使用します", "Dark Mode": "ダークモード", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/jbo.json b/i18n/jbo.json index 7cce9584..86f1d983 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/ko.json b/i18n/ko.json index 64bc773f..abc2e80a 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/ku.json b/i18n/ku.json index 84d070a7..11b87e66 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "جۆری ڕەش", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/la.json b/i18n/la.json index 45e9951c..5ee106fd 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Dark Mode", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/lt.json b/i18n/lt.json index 63aeb17f..3bbf0745 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -219,5 +219,6 @@ "Yes, see it": "Taip, pamatyti", "Dark Mode": "Tamsi veiksena", "Error compressing paste, due to missing WebAssembly support.": "Klaida glaudinant įdėjimą, nes trūksta WebAssembly palaikymo.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Klaida išglaudinant įdėjimą, jūsų naršyklė nepalaiko WebAssembly. Norėdami peržiūrėti šį įdėjimą, naudokite kitą naršyklę." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Klaida išglaudinant įdėjimą, jūsų naršyklė nepalaiko WebAssembly. Norėdami peržiūrėti šį įdėjimą, naudokite kitą naršyklę.", + "Start over": "Start over" } diff --git a/i18n/nl.json b/i18n/nl.json index 80efa6ad..39762f6e 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -219,5 +219,6 @@ "Yes, see it": "Ja, tonen", "Dark Mode": "Donkere modus", "Error compressing paste, due to missing WebAssembly support.": "Fout bij het comprimeren van notitie door ontbrekende ondersteuning voor WebAssembly.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fout bij het decomprimeren van de notitie, uw browser ondersteunt WebAssembly niet. Gebruik een andere browser om deze notitie te bekijken." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Fout bij het decomprimeren van de notitie, uw browser ondersteunt WebAssembly niet. Gebruik een andere browser om deze notitie te bekijken.", + "Start over": "Start over" } diff --git a/i18n/no.json b/i18n/no.json index f1850408..0917cbee 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -219,5 +219,6 @@ "Yes, see it": "Ja, se det", "Dark Mode": "Mørk modus", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/oc.json b/i18n/oc.json index 6708fdad..d863f283 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -219,5 +219,6 @@ "Yes, see it": "Òc, afichatz-lo", "Dark Mode": "Mòde escur", "Error compressing paste, due to missing WebAssembly support.": "Error al moment de la compression de l'empegatge, a causa de la manca de presa en carga de WebAssembly.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error al moment de descompresar l'empegatge, vòstre navegador pren pas en carga WebAssembly. Mercés d'utilizar un autre navigador per visualizar aquesta pega." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error al moment de descompresar l'empegatge, vòstre navegador pren pas en carga WebAssembly. Mercés d'utilizar un autre navigador per visualizar aquesta pega.", + "Start over": "Start over" } diff --git a/i18n/pl.json b/i18n/pl.json index 78d3e030..616ec987 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -207,17 +207,18 @@ "Use Current Timezone": "Użyj bieżącej strefy czasowej", "Convert To UTC": "Zamień na UTC", "Close": "Zamknij", - "Encrypted note on %s": "Encrypted note on %s", - "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.", - "URL shortener may expose your decrypt key in URL.": "URL shortener may expose your decrypt key in URL.", - "Save paste": "Save paste", - "Your IP is not authorized to create pastes.": "Your IP is not authorized to create pastes.", - "Trying to shorten a URL that isn't pointing at our instance.": "Trying to shorten a URL that isn't pointing at our instance.", - "Error calling YOURLS. Probably a configuration issue, like wrong or missing \"apiurl\" or \"signature\".": "Error calling YOURLS. Probably a configuration issue, like wrong or missing \"apiurl\" or \"signature\".", - "Error parsing YOURLS response.": "Error parsing YOURLS response.", - "This secret message can only be displayed once. Would you like to see it now?": "This secret message can only be displayed once. Would you like to see it now?", - "Yes, see it": "Yes, see it", + "Encrypted note on %s": "Zaszyfrowana notatka na %s", + "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Naciśnij tej odnośnik, aby zobaczyć notatkę. Każda osoba z dostępem do tego adresu URL również może zobaczyć tę notatkę.", + "URL shortener may expose your decrypt key in URL.": "Skrócenie adresu URL może ujawnić Twój klucz odszyfrowujący w adresie URL.", + "Save paste": "Zapisz wklejenie", + "Your IP is not authorized to create pastes.": "Twój adres IP nie jest upoważniony do tworzenia wklejeń.", + "Trying to shorten a URL that isn't pointing at our instance.": "Próba skrócenia adresu URL wskazującego na inną instancję.", + "Error calling YOURLS. Probably a configuration issue, like wrong or missing \"apiurl\" or \"signature\".": "Błąd wywoływania YOURLS. Możliwy błąd konfiguracji, taki jak błędne lub brakujące \"apiurl\" lub \"signature\".", + "Error parsing YOURLS response.": "Błąd przetwarzania odpowiedzi YOURLS.", + "This secret message can only be displayed once. Would you like to see it now?": "Tę tajną wiadomość możesz zobaczyć tylko jeden raz. Czy chcesz to zrobić teraz?", + "Yes, see it": "Tak, pokaż", "Dark Mode": "Ciemny motyw", - "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error compressing paste, due to missing WebAssembly support.": "Błąd kompresowania wklejenia przez brak obsługi WebAssembly.", + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Błąd dekompresowania wklejenia przez brak obsługi WebAssembly przez przeglądarkę. Użyj innej przeglądarki, aby zobaczyć to wklejenie.", + "Start over": "Start over" } diff --git a/i18n/pt.json b/i18n/pt.json index 34252572..2cb3b7a0 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -219,5 +219,6 @@ "Yes, see it": "Sim, veja", "Dark Mode": "Modo Noturno", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/ro.json b/i18n/ro.json index 5d1d1b3b..5e264979 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -219,5 +219,6 @@ "Yes, see it": "Da, vezi", "Dark Mode": "Mod întunecat", "Error compressing paste, due to missing WebAssembly support.": "Eroare la compresia paste-ului din cauza incompatibilității cu WebAssembly.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Eroare la deschiderea paste-ului, browserul dvs. nu acceptă WebAssembly. Vă rugăm să utilizați un alt browser pentru a vedea acest paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Eroare la deschiderea paste-ului, browserul dvs. nu acceptă WebAssembly. Vă rugăm să utilizați un alt browser pentru a vedea acest paste.", + "Start over": "Start over" } diff --git a/i18n/ru.json b/i18n/ru.json index d7081105..387ec8f4 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -219,5 +219,6 @@ "Yes, see it": "Да, загрузить", "Dark Mode": "Тёмная", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/sk.json b/i18n/sk.json index 59390e13..6ed38c68 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Tmavý Režim", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/sl.json b/i18n/sl.json index cb0f1e50..987724ec 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Temni način", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/sv.json b/i18n/sv.json index 0e24e37b..9bd57df9 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "Mörkt Läge", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/th.json b/i18n/th.json index c0aa6803..ddebf39f 100644 --- a/i18n/th.json +++ b/i18n/th.json @@ -219,5 +219,6 @@ "Yes, see it": "Yes, see it", "Dark Mode": "โหมดมืด", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/tr.json b/i18n/tr.json index 49dcad49..fbc65dd3 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -219,5 +219,6 @@ "Yes, see it": "Evet, görüyorum", "Dark Mode": "Koyu Mod", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/i18n/uk.json b/i18n/uk.json index 1b46edc5..9b1f2970 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -219,5 +219,6 @@ "Yes, see it": "Так, побачити", "Dark Mode": "Темний режим", "Error compressing paste, due to missing WebAssembly support.": "Помилка при стисканні допису, через відсутність підтримки WebAssembly сервера.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Помилка при розпакуванні допису, бо ваш браузер не підтримує WebAssembly. Будь ласка, відкрийте в іншому браузері для перегляду цього допису." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Помилка при розпакуванні допису, бо ваш браузер не підтримує WebAssembly. Будь ласка, відкрийте в іншому браузері для перегляду цього допису.", + "Start over": "Start over" } diff --git a/i18n/zh.json b/i18n/zh.json index 80f081c5..da1d4e9a 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -219,5 +219,6 @@ "Yes, see it": "是的,加载它", "Dark Mode": "暗黑模式", "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.", - "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste." + "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.", + "Start over": "Start over" } diff --git a/js/privatebin.js b/js/privatebin.js index 9c843628..8167d805 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -3988,7 +3988,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { } emailBody += I18n._('Link:'); emailBody += EOL; - emailBody += $('#pasteurl').attr('href'); // might have been shortened + emailBody += $('#pasteurl').attr('href') || window.location.href; // href is tried first as it might have been shortened return emailBody; } @@ -5626,8 +5626,11 @@ jQuery.PrivateBin = (function($, RawDeflate) { me.initZ(); // if delete token is passed (i.e. paste has been deleted by this - // access), there is nothing more to do + // access), add an event listener for the 'new' paste button in the alert if (Model.hasDeleteToken()) { + $("#new-from-alert").on("click", function () { + UiHelper.reloadHome(); + }); return; } diff --git a/lib/Configuration.php b/lib/Configuration.php index 9b2717ca..e4b9dc9e 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -108,7 +108,7 @@ class Configuration 'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==', 'js/legacy.js' => 'sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==', 'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', - 'js/privatebin.js' => 'sha512-cbmXvtZ/5gZPFjQDzP3IEhUAIhFPAoM31gw2kRYCT5xOh8wv9gXeDqI/t798luRW1xdC4gaYodjEFCzrsZR4mA==', + 'js/privatebin.js' => 'sha512-JUj/Sbl/bMHlIoIUT1U9e89JU33fDBxCxLSGxwwaeydBFXOBHyfdF7hwSIjgbPxb4d9CO7CSe4meouTIRMy8Vg==', 'js/purify-3.1.6.js' => 'sha512-SDwfsqHZFhbcBo/6AN7Te4KoUkWHHw7TzyZCuRkkpl0o8oV4owT/lprznWWe9+qFtigb6MrF81K4CQRLN6be+A==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', diff --git a/lib/Controller.php b/lib/Controller.php index 58d1369d..fb012f10 100644 --- a/lib/Controller.php +++ b/lib/Controller.php @@ -67,6 +67,14 @@ class Controller */ private $_status = ''; + /** + * status message + * + * @access private + * @var bool + */ + private $_is_deleted = false; + /** * JSON message * @@ -308,7 +316,8 @@ class Controller if (hash_equals($paste->getDeleteToken(), $deletetoken)) { // Paste exists and deletion token is valid: Delete the paste. $paste->delete(); - $this->_status = 'Paste was properly deleted.'; + $this->_status = 'Paste was properly deleted.'; + $this->_is_deleted = true; } else { $this->_error = 'Wrong deletion token. Paste was not deleted.'; } @@ -412,6 +421,7 @@ class Controller } $page->assign('BASEPATH', I18n::_($this->_conf->getKey('basepath'))); $page->assign('STATUS', I18n::_($this->_status)); + $page->assign('ISDELETED', I18n::_(json_encode($this->_is_deleted))); $page->assign('VERSION', self::VERSION); $page->assign('DISCUSSION', $this->_conf->getKey('discussion')); $page->assign('OPENDISCUSSION', $this->_conf->getKey('opendiscussion')); diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index a9306e43..7efdbdc7 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -42,7 +42,7 @@ if ($SYNTAXHIGHLIGHTING) : endif; ?> - _scriptTag('js/jquery-3.7.1.js', ''); ?> + _scriptTag('js/jquery-3.7.1.js'); ?> @@ -56,8 +56,8 @@ if ($ZEROBINCOMPATIBILITY) : endif; ?> _scriptTag('js/zlib-1.3.1.js', 'async'); ?> - _scriptTag('js/base-x-4.0.0.js', ''); ?> - _scriptTag('js/rawinflate-0.3.js', ''); ?> + _scriptTag('js/base-x-4.0.0.js'); ?> + _scriptTag('js/rawinflate-0.3.js'); ?> _scriptTag('js/bootstrap-3.4.1.js', 'defer'); ?> -