diff --git a/CHANGELOG.md b/CHANGELOG.md index 6431e67f..b897b676 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * CHANGED: Upgrading libraries to: zlib 1.2.13 * FIXED: Revert to CREATE INDEX without IF NOT EXISTS clauses, to support MySQL (#943) * FIXED: Apply table prefix to indexes as well, to support multiple instances sharing a single database (#943) + * FIXED: YOURLS integration via new proxy, storing signature in configuration (#725) * **1.4 (2022-04-09)** * ADDED: Translations for Corsican, Estonian, Finnish and Lojban * ADDED: new HTTP headers improving security (#765) diff --git a/CREDITS.md b/CREDITS.md index d0035077..97c11251 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -30,6 +30,7 @@ * Mark van Holsteijn - Google Cloud Storage backend * Austin Huang - Oracle database support * Felix J. Ogris - S3 Storage backend +* Mounir Idrassi & J. Mozdzen - secure YOURLS integration ## Translations * Hexalyse - French diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php index cf465980..7afe7aae 100644 --- a/cfg/conf.sample.php +++ b/cfg/conf.sample.php @@ -227,3 +227,20 @@ dir = PATH "data" ;bucket = "my-bucket" ;accesskey = "access key id" ;secretkey = "secret access key" + +[yourls] +; don't mix this up with "urlshortener" config item: +; - when using a standard configuration, "urlshortener" will point to the YOURLS +; API, including access credentials, and will be part of the PrivateBin public +; web page (insecure!) +; - when using the parameters in this section ("signature" and "apiurl"), +; "urlshortener" will point to a fixed PrivateBin page +; ("$basepath/shortenviayourls?link=") and that URL will in turn call YOURLS +; server-side, using the URL from "apiurl" and the "access signature" from the +; "signature" parameters below. + +; (optional) the "signature" (access key) issued by YOURLS for the using account +; signature = "" + +; (optional) the URL of the YOURLS API, called to shorten a PrivateBin URL +; apiurl = "" diff --git a/i18n/ar.json b/i18n/ar.json index 1827ddf2..204b61bb 100644 --- a/i18n/ar.json +++ b/i18n/ar.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/bg.json b/i18n/bg.json index 717c5f18..244763bb 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/ca.json b/i18n/ca.json index 01651989..b1e09367 100644 --- a/i18n/ca.json +++ b/i18n/ca.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/co.json b/i18n/co.json index 21ca71ec..c0659b31 100644 --- a/i18n/co.json +++ b/i18n/co.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Impiegà u fusu orariu attuale", "Convert To UTC": "Cunvertisce in UTC", "Close": "Chjode", - "Encrypted note on PrivateBin": "Nota cifrata nant’à PrivateBin", + "Encrypted note on %s": "Nota cifrata nant’à %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Visitate stu liame per vede a nota. Date l’indirizzu à qualunque li permette d’accede à a nota dinù.", "URL shortener may expose your decrypt key in URL.": "Un ammuzzatore d’indirizzu pò palisà a vostra chjave di dicifratura in l’indirizzu.", "Save paste": "Arregistrà l’appiccicu", - "Your IP is not authorized to create pastes.": "U vostru indirizzu IP ùn hè micca auturizatu à creà l’appiccichi." + "Your IP is not authorized to create pastes.": "U vostru indirizzu IP ùn hè micca auturizatu à creà l’appiccichi.", + "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." } diff --git a/i18n/cs.json b/i18n/cs.json index 82cb1732..a0121e9f 100644 --- a/i18n/cs.json +++ b/i18n/cs.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Použít aktuální časové pásmo", "Convert To UTC": "Převést na UTC", "Close": "Zavřít", - "Encrypted note on PrivateBin": "Šifrovaná poznámka ve službě PrivateBin", + "Encrypted note on %s": "Šifrovaná poznámka ve službě %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Navštivte tento odkaz pro zobrazení poznámky. Přeposláním URL umožníte také jiným lidem přístup.", "URL shortener may expose your decrypt key in URL.": "Zkracovač URL může odhalit váš dešifrovací klíč v URL.", "Save paste": "Uložit příspěvek", - "Your IP is not authorized to create pastes.": "Vaše IP adresa nemá oprávnění k vytvoření vložení." + "Your IP is not authorized to create pastes.": "Vaše IP adresa nemá oprávnění k vytvoření vložení.", + "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." } diff --git a/i18n/de.json b/i18n/de.json index 42752f2f..fc2065bb 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Aktuelle Zeitzone verwenden", "Convert To UTC": "In UTC umwandeln", "Close": "Schliessen", - "Encrypted note on PrivateBin": "Verschlüsselte Notiz auf PrivateBin", + "Encrypted note on %s": "Verschlüsselte Notiz auf %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Besuche diesen Link um das Dokument zu sehen. Wird die URL an eine andere Person gegeben, so kann diese Person ebenfalls auf dieses Dokument zugreifen.", "URL shortener may expose your decrypt key in URL.": "Der URL-Verkürzer kann den Schlüssel in der URL enthüllen.", "Save paste": "Text speichern", - "Your IP is not authorized to create pastes.": "Deine IP ist nicht berechtigt, Texte zu erstellen." + "Your IP is not authorized to create pastes.": "Deine IP ist nicht berechtigt, Texte zu erstellen.", + "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." } diff --git a/i18n/el.json b/i18n/el.json index 15df67be..fbb14805 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Χρήση τρέχουσας ζώνης ώρας", "Convert To UTC": "Μετατροπή σε UTC", "Close": "Κλείσιμο", - "Encrypted note on PrivateBin": "Κρυπτογραφημένο μήνυμα από το PrivateBin", + "Encrypted note on %s": "Κρυπτογραφημένο μήνυμα από το %s", "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.": "Συντομευτές συνδέσμων πιθανώς να δημοσιοποιήσουν το κλειδί αποκρυπτογράφισης στον σύνδεσμο.", "Save paste": "Αποθήκευση επικόλλησης", - "Your IP is not authorized to create pastes.": "Η IP σας δεν επιτρέπεται να δημιουργεί επικολλήσεις." + "Your IP is not authorized to create pastes.": "Η IP σας δεν επιτρέπεται να δημιουργεί επικολλήσεις.", + "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." } diff --git a/i18n/en.json b/i18n/en.json index 2ba6068f..a4d6d350 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/es.json b/i18n/es.json index 641ef3ba..45e8ecbc 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Usar Zona Horaria Actual", "Convert To UTC": "Convertir A UTC", "Close": "Cerrar", - "Encrypted note on PrivateBin": "Nota cifrada en PrivateBin", + "Encrypted note on %s": "Nota cifrada en %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Visite este enlace para ver la nota. Dar la URL a cualquier persona también les permite acceder a la nota.", "URL shortener may expose your decrypt key in URL.": "El acortador de URL puede exponer su clave de descifrado en el URL.", "Save paste": "Guardar \"paste\"", - "Your IP is not authorized to create pastes.": "Tu IP no está autorizada para crear contenido." + "Your IP is not authorized to create pastes.": "Tu IP no está autorizada para crear contenido.", + "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." } diff --git a/i18n/et.json b/i18n/et.json index f02cefba..4c8e48b8 100644 --- a/i18n/et.json +++ b/i18n/et.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Kasuta praegust ajavööndit", "Convert To UTC": "Teisenda UTC-ks", "Close": "Sulge", - "Encrypted note on PrivateBin": "Krüpteeritud kiri PrivateBin-is", + "Encrypted note on %s": "Krüpteeritud kiri %s-is", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Kirja nägemiseks külasta seda linki. Teistele URL-i andmine lubab ka neil ligi pääseda kirjale.", "URL shortener may expose your decrypt key in URL.": "URL-i lühendaja võib paljastada sinu dekrüpteerimisvõtme URL-is.", "Save paste": "Salvesta kleebe", - "Your IP is not authorized to create pastes.": "Your IP is not authorized to create pastes." + "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." } diff --git a/i18n/fi.json b/i18n/fi.json index 90b56733..665ea278 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Käytä nykyistä aikavyöhykettä", "Convert To UTC": "Muuta UTC:ksi", "Close": "Sulje", - "Encrypted note on PrivateBin": "Salattu viesti PrivateBinissä", + "Encrypted note on %s": "Salattu viesti %sissä", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Käy tässä linkissä nähdäksesi viestin. URL:n antaminen kenellekään antaa heidänkin päästä katsomeen viestiä. ", "URL shortener may expose your decrypt key in URL.": "URL-lyhentäjä voi paljastaa purkuavaimesi URL:ssä.", "Save paste": "Tallenna paste", - "Your IP is not authorized to create pastes.": "IP:llesi ei ole annettu oikeutta luoda pasteja." + "Your IP is not authorized to create pastes.": "IP:llesi ei ole annettu oikeutta luoda pasteja.", + "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." } diff --git a/i18n/fr.json b/i18n/fr.json index 2f3d491e..788bd5d5 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Conserver l'actuel", "Convert To UTC": "Convertir en UTC", "Close": "Fermer", - "Encrypted note on PrivateBin": "Message chiffré sur PrivateBin", + "Encrypted note on %s": "Message chiffré sur %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Visiter ce lien pour voir la note. Donner l'URL à une autre personne lui permet également d'accéder à la note.", "URL shortener may expose your decrypt key in URL.": "Raccourcir l'URL peut exposer votre clé de déchiffrement dans l'URL.", "Save paste": "Sauver le paste", - "Your IP is not authorized to create pastes.": "Votre adresse IP n'est pas autorisée à créer des pastes." + "Your IP is not authorized to create pastes.": "Votre adresse IP n'est pas autorisée à créer des 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." } diff --git a/i18n/he.json b/i18n/he.json index 503dbc16..0a1bae6c 100644 --- a/i18n/he.json +++ b/i18n/he.json @@ -182,9 +182,12 @@ "Use Current Timezone": "להשתמש באזור הזמן הנוכחי", "Convert To UTC": "המרה ל־UTC", "Close": "סגירה", - "Encrypted note on PrivateBin": "הערה מוצפנת ב־PrivateBin", + "Encrypted note on %s": "הערה מוצפנת ב־%s", "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." + "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." } diff --git a/i18n/hi.json b/i18n/hi.json index 4df6aa71..7e8d8c07 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/hu.json b/i18n/hu.json index c9acb042..ffe15514 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Az aktuális időzóna használata", "Convert To UTC": "Átalakítás UTC időzónára", "Close": "Bezárás", - "Encrypted note on PrivateBin": "Titkosított jegyzet a PrivateBinen", + "Encrypted note on %s": "Titkosított jegyzet a %sen", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Látogasd meg ezt a hivatkozást a bejegyzés megtekintéséhez. Ha mások számára is megadod ezt a linket, azzal hozzáférnek ők is.", "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." + "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." } diff --git a/i18n/id.json b/i18n/id.json index 1edeb997..4c5af357 100644 --- a/i18n/id.json +++ b/i18n/id.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Gunakan Zonawaktu Saat Ini", "Convert To UTC": "Konversi Ke UTC", "Close": "Tutup", - "Encrypted note on PrivateBin": "Catatan ter-ekrip di PrivateBin", + "Encrypted note on %s": "Catatan ter-ekrip di %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Kunjungi tautan ini untuk melihat catatan. Memberikan alamat URL pada siapapun juga, akan mengizinkan mereka untuk mengakses catatan, so pasti gitu loh Kaka.", "URL shortener may expose your decrypt key in URL.": "Pemendek URL mungkin akan menampakkan kunci dekrip Anda dalam URL.", "Save paste": "Simpan paste", - "Your IP is not authorized to create pastes.": "Your IP is not authorized to create pastes." + "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." } diff --git a/i18n/it.json b/i18n/it.json index e00ce310..49112b31 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Usa Fuso Orario Corrente", "Convert To UTC": "Converti a UTC", "Close": "Chiudi", - "Encrypted note on PrivateBin": "Nota crittografata su PrivateBin", + "Encrypted note on %s": "Nota crittografata su %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Visita questo collegamento per vedere la nota. Dare l'URL a chiunque consente anche a loro di accedere alla nota.", "URL shortener may expose your decrypt key in URL.": "URL shortener può esporre la tua chiave decrittografata nell'URL.", "Save paste": "Salva il messagio", - "Your IP is not authorized to create pastes.": "Il tuo IP non è autorizzato a creare dei messaggi." + "Your IP is not authorized to create pastes.": "Il tuo IP non è autorizzato a creare dei messaggi.", + "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." } diff --git a/i18n/ja.json b/i18n/ja.json index 330032fd..6f243f92 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/jbo.json b/i18n/jbo.json index 82cea900..307e0303 100644 --- a/i18n/jbo.json +++ b/i18n/jbo.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "galfi lo cabni la utc", "Close": "ganlo", - "Encrypted note on PrivateBin": ".i lo lo notci ku mifra cu zvati sivlolnitvanku'a", + "Encrypted note on %s": ".i lo lo notci ku mifra cu zvati %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": "rejgau fukpi", - "Your IP is not authorized to create pastes.": "Your IP is not authorized to create pastes." + "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." } diff --git a/i18n/ku.json b/i18n/ku.json index bca43477..8a0bbaac 100644 --- a/i18n/ku.json +++ b/i18n/ku.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/la.json b/i18n/la.json index fe6c4001..54d9b3f8 100644 --- a/i18n/la.json +++ b/i18n/la.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/lt.json b/i18n/lt.json index 76b28163..74f36d82 100644 --- a/i18n/lt.json +++ b/i18n/lt.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Naudoti esamą laiko juostą", "Convert To UTC": "Konvertuoti į UTC", "Close": "Užverti", - "Encrypted note on PrivateBin": "Šifruoti užrašai ties PrivateBin", + "Encrypted note on %s": "Šifruoti užrašai ties %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Norėdami matyti užrašus, aplankykite šį tinklalapį. Pasidalinus šiuo URL adresu su kitais žmonėmis, jiems taip pat bus leidžiama prieiga prie šių užrašų.", "URL shortener may expose your decrypt key in URL.": "URL trumpinimo įrankis gali atskleisti URL adrese jūsų iššifravimo raktą.", "Save paste": "Įrašyti įdėjimą", - "Your IP is not authorized to create pastes.": "Jūsų IP adresas neturi įgaliojimų kurti įdėjimų." + "Your IP is not authorized to create pastes.": "Jūsų IP adresas neturi įgaliojimų kurti įdėjimų.", + "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." } diff --git a/i18n/nl.json b/i18n/nl.json index 6157bfa3..600d41ed 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Gebruik huidige tijdzone", "Convert To UTC": "Omzetten naar UTC", "Close": "Sluiten", - "Encrypted note on PrivateBin": "Versleutelde notitie op PrivateBin", + "Encrypted note on %s": "Versleutelde notitie op %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Bezoek deze link om de notitie te bekijken. Als je de URL aan iemand geeft, kan die de notitie ook bekijken.", "URL shortener may expose your decrypt key in URL.": "URL-verkorter kan uw ontcijferingssleutel in URL blootleggen.", "Save paste": "Notitie opslaan", - "Your IP is not authorized to create pastes.": "Uw IP-adres is niet gemachtigd om geplakte tekst te maken." + "Your IP is not authorized to create pastes.": "Uw IP-adres is niet gemachtigd om geplakte tekst te maken.", + "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." } diff --git a/i18n/no.json b/i18n/no.json index eda1e4c5..251487e0 100644 --- a/i18n/no.json +++ b/i18n/no.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Bruk gjeldende tidssone", "Convert To UTC": "Konverter til UTC", "Close": "Steng", - "Encrypted note on PrivateBin": "Kryptert notat på PrivateBin", + "Encrypted note on %s": "Kryptert notat på %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Besøk denne lenken for å se notatet. Hvis lenken deles med andre, vil de også kunne se notatet.", "URL shortener may expose your decrypt key in URL.": "URL forkorter kan avsløre dekrypteringsnøkkelen.", "Save paste": "Lagre utklipp", - "Your IP is not authorized to create pastes.": "Your IP is not authorized to create pastes." + "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." } diff --git a/i18n/oc.json b/i18n/oc.json index f074d919..d277368d 100644 --- a/i18n/oc.json +++ b/i18n/oc.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Utilizar l’actual", "Convert To UTC": "Convertir en UTC", "Close": "Tampar", - "Encrypted note on PrivateBin": "Nòtas chifradas sus PrivateBin", + "Encrypted note on %s": "Nòtas chifradas sus %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Visitatz aqueste ligam per veire la nòta. Fornir lo ligam a qualqu’un mai li permet tanben d’accedir a la nòta.", "URL shortener may expose your decrypt key in URL.": "Los espleches d’acorchiment d’URL pòdon expausar la clau de deschiframent dins l’URL.", "Save paste": "Enregistrar lo tèxt", - "Your IP is not authorized to create pastes.": "Vòstra adreça IP a pas l’autorizacion de crear de tèxtes." + "Your IP is not authorized to create pastes.": "Vòstra adreça IP a pas l’autorizacion de crear de tèxtes.", + "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." } diff --git a/i18n/pl.json b/i18n/pl.json index b6127cad..933e67c7 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/pt.json b/i18n/pt.json index 72d0250f..6d890a13 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Usar Fuso Horário Atual", "Convert To UTC": "Converter para UTC", "Close": "Fechar", - "Encrypted note on PrivateBin": "Nota criptografada no PrivateBin", + "Encrypted note on %s": "Nota criptografada no %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Visite esse link para ver a nota. Dar a URL para qualquer um permite que eles também acessem a nota.", "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." + "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." } diff --git a/i18n/ru.json b/i18n/ru.json index f1d237b2..1c708196 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Использовать текущий часовой пояс", "Convert To UTC": "Конвертировать в UTC", "Close": "Закрыть", - "Encrypted note on PrivateBin": "Зашифрованная запись на PrivateBin", + "Encrypted note on %s": "Зашифрованная запись на %s", "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.": "Сервис сокращения ссылок может получить ваш ключ расшифровки из ссылки.", "Save paste": "Сохранить запись", - "Your IP is not authorized to create pastes.": "Вашему IP адресу не разрешено создавать записи." + "Your IP is not authorized to create pastes.": "Вашему IP адресу не разрешено создавать записи.", + "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." } diff --git a/i18n/sk.json b/i18n/sk.json index f1815da3..62af7241 100644 --- a/i18n/sk.json +++ b/i18n/sk.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Použiť aktuálne časové pásmo", "Convert To UTC": "Previesť na UTC", "Close": "Zavrieť", - "Encrypted note on PrivateBin": "Zašifrovaná poznámka na PrivateBin", + "Encrypted note on %s": "Zašifrovaná poznámka na %s", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Ak chcete zobraziť poznámku, navštívte tento odkaz. Poskytnutie adresy URL komukoľvek im umožní prístup aj k poznámke.", "URL shortener may expose your decrypt key in URL.": "Skracovač adries URL môže odhaliť váš dešifrovací kľúč v adrese URL.", "Save paste": "Uložiť príspevok", - "Your IP is not authorized to create pastes.": "Vaša IP adresa nie je oprávnená vytvárať príspevky." + "Your IP is not authorized to create pastes.": "Vaša IP adresa nie je oprávnená vytvárať príspevky.", + "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." } diff --git a/i18n/sl.json b/i18n/sl.json index 27c43611..099f98d5 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/sv.json b/i18n/sv.json index bb613296..87ee2a02 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Use Current Timezone", "Convert To UTC": "Convert To UTC", "Close": "Close", - "Encrypted note on PrivateBin": "Encrypted note on PrivateBin", + "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." + "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." } diff --git a/i18n/tr.json b/i18n/tr.json index 47d249cd..79a52da3 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Şuanki zaman dilimini kullan", "Convert To UTC": "UTC zaman dilimine çevir", "Close": "Kapat", - "Encrypted note on PrivateBin": "PrivateBin üzerinde şifrelenmiş not", + "Encrypted note on %s": "%s üzerinde şifrelenmiş not", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Notu görmek için bu bağlantıyı ziyaret et. Bağlantıya sahip olan birisi notu görebilir.", "URL shortener may expose your decrypt key in URL.": "URL kısaltıcı şifreleme anahtarınızı URL içerisinde gösterebilir.", "Save paste": "Yazıyı kaydet", - "Your IP is not authorized to create pastes.": "IP adresinizin yazı oluşturmaya yetkisi yoktur." + "Your IP is not authorized to create pastes.": "IP adresinizin yazı oluşturmaya yetkisi yoktur.", + "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." } diff --git a/i18n/uk.json b/i18n/uk.json index 2dbc6f40..946dea4a 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -182,9 +182,12 @@ "Use Current Timezone": "Використовувати поточний часовий пояс", "Convert To UTC": "Конвертувати в UTC", "Close": "Закрити", - "Encrypted note on PrivateBin": "Зашифрована нотатка на PrivateBin", + "Encrypted note on %s": "Зашифрована нотатка на %s", "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.", "Save paste": "Зберегти вставку", - "Your IP is not authorized to create pastes.": "Вашому IP не дозволено створювати вставки." + "Your IP is not authorized to create pastes.": "Вашому IP не дозволено створювати вставки.", + "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." } diff --git a/i18n/zh.json b/i18n/zh.json index 9bcad318..e5e60a52 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -182,9 +182,12 @@ "Use Current Timezone": "使用当前时区", "Convert To UTC": "转换为 UTC", "Close": "关闭", - "Encrypted note on PrivateBin": "PrivateBin 上的加密笔记", + "Encrypted note on %s": "%s 上的加密笔记", "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "访问此链接来查看该笔记。将此 URL 发送给任何人即可允许其访问该笔记。", "URL shortener may expose your decrypt key in URL.": "短链接服务可能会暴露您在 URL 中的解密密钥。", "Save paste": "保存内容", - "Your IP is not authorized to create pastes.": "您的 IP 无权创建粘贴。" + "Your IP is not authorized to create pastes.": "您的 IP 无权创建粘贴。", + "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." } diff --git a/lib/Configuration.php b/lib/Configuration.php index fad44a27..6f3a8225 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -93,6 +93,10 @@ class Configuration 'model_options' => array( 'dir' => 'data', ), + 'yourls' => array( + 'signature' => '', + 'apiurl' => '', + ), ); /** diff --git a/lib/Controller.php b/lib/Controller.php index 62fa1e99..1efd1145 100644 --- a/lib/Controller.php +++ b/lib/Controller.php @@ -136,6 +136,9 @@ class Controller case 'jsonld': $this->_jsonld($this->_request->getParam('jsonld')); return; + case 'yourlsproxy': + $this->_yourlsproxy($this->_request->getParam('link')); + break; } // output JSON or HTML @@ -378,9 +381,15 @@ class Controller ); $page = new View; - $page->assign('NAME', $this->_conf->getKey('name')); - $page->assign('BASEPATH', I18n::_($this->_conf->getKey('basepath'))); + $page->assign('CSPHEADER', $metacspheader); $page->assign('ERROR', I18n::_($this->_error)); + $page->assign('NAME', $this->_conf->getKey('name')); + if ($this->_request->getOperation() === 'yourlsproxy') { + $page->assign('SHORTURL', $this->_status); + $page->draw('yourlsproxy'); + return; + } + $page->assign('BASEPATH', I18n::_($this->_conf->getKey('basepath'))); $page->assign('STATUS', I18n::_($this->_status)); $page->assign('VERSION', self::VERSION); $page->assign('DISCUSSION', $this->_conf->getKey('discussion')); @@ -405,7 +414,6 @@ class Controller $page->assign('HTTPWARNING', $this->_conf->getKey('httpwarning')); $page->assign('HTTPSLINK', 'https://' . $this->_request->getHost() . $this->_request->getRequestUri()); $page->assign('COMPRESSION', $this->_conf->getKey('compression')); - $page->assign('CSPHEADER', $metacspheader); $page->draw($this->_conf->getKey('template')); } @@ -439,6 +447,22 @@ class Controller echo $content; } + /** + * proxies link to YOURLS, updates status or error with response + * + * @access private + * @param string $link + */ + private function _yourlsproxy($link) + { + $yourls = new YourlsProxy($this->_conf, $link); + if ($yourls->isError()) { + $this->_error = $yourls->getError(); + } else { + $this->_status = $yourls->getUrl(); + } + } + /** * prepares JSON encoded status message * diff --git a/lib/Request.php b/lib/Request.php index 2eff8a96..ea566f5c 100644 --- a/lib/Request.php +++ b/lib/Request.php @@ -120,6 +120,7 @@ class Request if ( !array_key_exists('pasteid', $this->_params) && !array_key_exists('jsonld', $this->_params) && + !array_key_exists('link', $this->_params) && array_key_exists('QUERY_STRING', $_SERVER) && !empty($_SERVER['QUERY_STRING']) ) { @@ -135,6 +136,10 @@ class Request } } elseif (array_key_exists('jsonld', $this->_params) && !empty($this->_params['jsonld'])) { $this->_operation = 'jsonld'; + } elseif (array_key_exists('link', $this->_params) && !empty($this->_params['link'])) { + if (strpos($this->getRequestUri(), '/shortenviayourls') !== false) { + $this->_operation = 'yourlsproxy'; + } } } diff --git a/lib/YourlsProxy.php b/lib/YourlsProxy.php new file mode 100644 index 00000000..858317a2 --- /dev/null +++ b/lib/YourlsProxy.php @@ -0,0 +1,132 @@ +getKey('basepath') . '/?') === false) { + $this->_error = 'Trying to shorten a URL that isn\'t pointing at our instance.'; + return; + } + + $yourls_api_url = $conf->getKey('apiurl', 'yourls'); + if (empty($yourls_api_url)) { + $this->_error = 'Error calling YOURLS. Probably a configuration issue, like wrong or missing "apiurl" or "signature".'; + return; + } + + $data = file_get_contents( + $yourls_api_url, false, stream_context_create( + array( + 'http' => array( + 'method' => 'POST', + 'header' => "Content-Type: application/x-www-form-urlencoded\r\n", + 'content' => http_build_query( + array( + 'signature' => $conf->getKey('signature', 'yourls'), + 'format' => 'json', + 'action' => 'shorturl', + 'url' => $link, + ) + ), + ), + ) + ) + ); + try { + $data = Json::decode($data); + } catch (Exception $e) { + $this->_error = 'Error calling YOURLS. Probably a configuration issue, like wrong or missing "apiurl" or "signature".'; + error_log('Error calling YOURLS: ' . $e->getMessage()); + return; + } + + if ( + !is_null($data) && + array_key_exists('statusCode', $data) && + $data['statusCode'] == 200 && + array_key_exists('shorturl', $data) + ) { + $this->_url = $data['shorturl']; + } else { + $this->_error = 'Error parsing YOURLS response.'; + } + } + + /** + * Returns the (untranslated) error message + * + * @access public + * @return string + */ + public function getError() + { + return $this->_error; + } + + /** + * Returns the shortened URL + * + * @access public + * @return string + */ + public function getUrl() + { + return $this->_url; + } + + /** + * Returns true if any error has occurred + * + * @access public + * @return bool + */ + public function isError() + { + return !empty($this->_error); + } +} diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 97e028a3..3dd49135 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -85,7 +85,7 @@ endif; - + diff --git a/tpl/page.php b/tpl/page.php index 7636f31a..f91cb7dd 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -63,7 +63,7 @@ endif; - + diff --git a/tpl/yourlsproxy.php b/tpl/yourlsproxy.php new file mode 100644 index 00000000..f642047d --- /dev/null +++ b/tpl/yourlsproxy.php @@ -0,0 +1,27 @@ + + + + + + + + <?php echo I18n::_($NAME); ?> + + + +

%s (Hit [Ctrl]+[c] to copy)', $SHORTURL, $SHORTURL); ?>

+ +
+

+
+ + + diff --git a/tst/ControllerTest.php b/tst/ControllerTest.php index 340a5fc5..5e3b924b 100644 --- a/tst/ControllerTest.php +++ b/tst/ControllerTest.php @@ -49,6 +49,7 @@ class ControllerTest extends TestCase */ public function testView() { + $_SERVER['HTTP_HOST'] = 'example.com'; $_SERVER['QUERY_STRING'] = Helper::getPasteId(); $_GET[Helper::getPasteId()] = ''; ob_start(); @@ -65,6 +66,11 @@ class ControllerTest extends TestCase $content, 'doesn\'t output shortener button' ); + $this->assertRegExp( + '# href="https://' . preg_quote($_SERVER['HTTP_HOST']) . '/">switching to HTTPS#', + $content, + 'outputs configured https URL correctly' + ); } /** diff --git a/tst/JsonApiTest.php b/tst/JsonApiTest.php index 409256b2..a9f73b38 100644 --- a/tst/JsonApiTest.php +++ b/tst/JsonApiTest.php @@ -16,6 +16,9 @@ class JsonApiTest extends TestCase { /* Setup Routine */ $this->_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'privatebin_data'; + if (!is_dir($this->_path)) { + mkdir($this->_path); + } $this->_model = Filesystem::getInstance(array('dir' => $this->_path)); ServerSalt::setStore($this->_model); @@ -187,8 +190,6 @@ class JsonApiTest extends TestCase */ public function testJsonLdPaste() { - $paste = Helper::getPaste(); - $this->_model->create(Helper::getPasteId(), $paste); $_GET['jsonld'] = 'paste'; ob_start(); new Controller; @@ -206,8 +207,6 @@ class JsonApiTest extends TestCase */ public function testJsonLdComment() { - $paste = Helper::getPaste(); - $this->_model->create(Helper::getPasteId(), $paste); $_GET['jsonld'] = 'comment'; ob_start(); new Controller; @@ -225,8 +224,6 @@ class JsonApiTest extends TestCase */ public function testJsonLdPasteMeta() { - $paste = Helper::getPaste(); - $this->_model->create(Helper::getPasteId(), $paste); $_GET['jsonld'] = 'pastemeta'; ob_start(); new Controller; @@ -244,8 +241,6 @@ class JsonApiTest extends TestCase */ public function testJsonLdCommentMeta() { - $paste = Helper::getPaste(); - $this->_model->create(Helper::getPasteId(), $paste); $_GET['jsonld'] = 'commentmeta'; ob_start(); new Controller; @@ -263,8 +258,6 @@ class JsonApiTest extends TestCase */ public function testJsonLdInvalid() { - $paste = Helper::getPaste(); - $this->_model->create(Helper::getPasteId(), $paste); $_GET['jsonld'] = CONF; ob_start(); new Controller; @@ -272,4 +265,42 @@ class JsonApiTest extends TestCase ob_end_clean(); $this->assertEquals('{}', $content, 'does not output nasty data'); } + + /** + * @runInSeparateProcess + */ + public function testShortenViaYourls() + { + $mock_yourls_service = $this->_path . DIRECTORY_SEPARATOR . 'yourls.json'; + $options = parse_ini_file(CONF, true); + $options['main']['basepath'] = 'https://example.com/path'; + $options['main']['urlshortener'] = 'https://example.com/path/shortenviayourls?link='; + $options['yourls']['apiurl'] = $mock_yourls_service; + Helper::createIniFile(CONF, $options); + + // the real service answer is more complex, but we only look for the shorturl & statusCode + file_put_contents($mock_yourls_service, '{"shorturl":"https:\/\/example.com\/1","statusCode":200}'); + + $_SERVER['REQUEST_URI'] = '/path/shortenviayourls?link=https%3A%2F%2Fexample.com%2Fpath%2F%3Ffoo%23bar'; + $_GET['link'] = 'https://example.com/path/?foo#bar'; + ob_start(); + new Controller; + $content = ob_get_contents(); + ob_end_clean(); + $this->assertContains('id="pasteurl" href="https://example.com/1"', $content, 'outputs shortened URL correctly'); + } + + /** + * @runInSeparateProcess + */ + public function testShortenViaYourlsFailure() + { + $_SERVER['REQUEST_URI'] = '/path/shortenviayourls?link=https%3A%2F%2Fexample.com%2Fpath%2F%3Ffoo%23bar'; + $_GET['link'] = 'https://example.com/path/?foo#bar'; + ob_start(); + new Controller; + $content = ob_get_contents(); + ob_end_clean(); + $this->assertContains('Error calling YOURLS.', $content, 'outputs error correctly'); + } } diff --git a/tst/ViewTest.php b/tst/ViewTest.php index 2293363e..535abf13 100644 --- a/tst/ViewTest.php +++ b/tst/ViewTest.php @@ -102,6 +102,10 @@ class ViewTest extends TestCase $content, $template . ': outputs error correctly' ); + if ($template === 'yourlsproxy') { + // yourlsproxy template only displays error message + continue; + } $this->assertMatchesRegularExpression( '#<[^>]+id="password"[^>]*>#', $content, diff --git a/tst/YourlsProxyTest.php b/tst/YourlsProxyTest.php new file mode 100644 index 00000000..2e372995 --- /dev/null +++ b/tst/YourlsProxyTest.php @@ -0,0 +1,75 @@ +_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'privatebin_data'; + if (!is_dir($this->_path)) { + mkdir($this->_path); + } + $this->_mock_yourls_service = $this->_path . DIRECTORY_SEPARATOR . 'yourls.json'; + $options = parse_ini_file(CONF_SAMPLE, true); + $options['main']['basepath'] = 'https://example.com'; + $options['main']['urlshortener'] = 'https://example.com/shortenviayourls?link='; + $options['yourls']['apiurl'] = $this->_mock_yourls_service; + Helper::confBackup(); + Helper::createIniFile(CONF, $options); + $this->_conf = new Configuration; + } + + public function tearDown() + { + /* Tear Down Routine */ + unlink(CONF); + Helper::confRestore(); + Helper::rmDir($this->_path); + } + + public function testYourlsProxy() + { + // the real service answer is more complex, but we only look for the shorturl & statusCode + file_put_contents($this->_mock_yourls_service, '{"shorturl":"https:\/\/example.com\/1","statusCode":200}'); + + $yourls = new YourlsProxy($this->_conf, 'https://example.com/?foo#bar'); + $this->assertFalse($yourls->isError()); + $this->assertEquals($yourls->getUrl(), 'https://example.com/1'); + } + + public function testForeignUrl() + { + $yourls = new YourlsProxy($this->_conf, 'https://other.example.com/?foo#bar'); + $this->assertTrue($yourls->isError()); + $this->assertEquals($yourls->getError(), 'Trying to shorten a URL that isn\'t pointing at our instance.'); + } + + public function testYourlsError() + { + // when statusCode is not 200, shorturl may not have been set + file_put_contents($this->_mock_yourls_service, '{"statusCode":403}'); + + $yourls = new YourlsProxy($this->_conf, 'https://example.com/?foo#bar'); + $this->assertTrue($yourls->isError()); + $this->assertEquals($yourls->getError(), 'Error parsing YOURLS response.'); + } + + public function testServerError() + { + // simulate some other server error that results in a non-JSON reply + file_put_contents($this->_mock_yourls_service, '500 Internal Server Error'); + + $yourls = new YourlsProxy($this->_conf, 'https://example.com/?foo#bar'); + $this->assertTrue($yourls->isError()); + $this->assertEquals($yourls->getError(), 'Error calling YOURLS. Probably a configuration issue, like wrong or missing "apiurl" or "signature".'); + } +}