mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-04-16 21:27:25 -04:00
Compare commits
11 Commits
challenge-
...
1.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0780e5ace2 | ||
|
|
5d7658b58f | ||
|
|
1e2014b9fa | ||
|
|
07018e5876 | ||
|
|
6df5127132 | ||
|
|
8ae87d8653 | ||
|
|
d8ba1b1462 | ||
|
|
07e0b267f9 | ||
|
|
ae456bf7a1 | ||
|
|
57417c08cf | ||
|
|
943b6bdfc3 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -18,3 +18,4 @@ js/test/ export-ignore
|
|||||||
.styleci.yml export-ignore
|
.styleci.yml export-ignore
|
||||||
.travis.yml export-ignore
|
.travis.yml export-ignore
|
||||||
composer.json export-ignore
|
composer.json export-ignore
|
||||||
|
BADGES.md export-ignore
|
||||||
|
|||||||
9
BADGES.md
Normal file
9
BADGES.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Badges
|
||||||
|
|
||||||
|
[](https://travis-ci.org/PrivateBin/PrivateBin) [](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/build-status/master)
|
||||||
|
[](https://www.codacy.com/app/PrivateBin/PrivateBin)
|
||||||
|
[](https://codeclimate.com/github/PrivateBin/PrivateBin)
|
||||||
|
[](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/?branch=master)
|
||||||
|
[](https://insight.sensiolabs.com/projects/57c9e74e-c6f9-4de6-a876-df66ec2ea1ff)
|
||||||
|
[](https://www.codacy.com/app/PrivateBin/PrivateBin)
|
||||||
|
[](https://codeclimate.com/github/PrivateBin/PrivateBin/coverage) [](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/?branch=master)
|
||||||
@@ -165,7 +165,7 @@ CREATE INDEX parent ON prefix_comment(pasteid);
|
|||||||
CREATE TABLE prefix_config (
|
CREATE TABLE prefix_config (
|
||||||
id CHAR(16) NOT NULL, value TEXT, PRIMARY KEY (id)
|
id CHAR(16) NOT NULL, value TEXT, PRIMARY KEY (id)
|
||||||
);
|
);
|
||||||
INSERT INTO prefix_config VALUES('VERSION', '1.2.1');
|
INSERT INTO prefix_config VALUES('VERSION', '1.3');
|
||||||
```
|
```
|
||||||
|
|
||||||
In **PostgreSQL**, the data, attachment, nickname and vizhash columns needs to be TEXT and not BLOB or MEDIUMBLOB.
|
In **PostgreSQL**, the data, attachment, nickname and vizhash columns needs to be TEXT and not BLOB or MEDIUMBLOB.
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -1,13 +1,6 @@
|
|||||||
# [<img alt="PrivateBin" src="https://cdn.rawgit.com/PrivateBin/assets/master/images/minified/logo.svg" width="500" />](https://privatebin.info/)
|
# [](https://privatebin.info/)
|
||||||
[](https://travis-ci.org/PrivateBin/PrivateBin) [](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/build-status/master)
|
|
||||||
[](https://www.codacy.com/app/PrivateBin/PrivateBin)
|
|
||||||
[](https://codeclimate.com/github/PrivateBin/PrivateBin)
|
|
||||||
[](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/?branch=master)
|
|
||||||
[](https://insight.sensiolabs.com/projects/57c9e74e-c6f9-4de6-a876-df66ec2ea1ff)
|
|
||||||
[](https://www.codacy.com/app/PrivateBin/PrivateBin)
|
|
||||||
[](https://codeclimate.com/github/PrivateBin/PrivateBin/coverage) [](https://scrutinizer-ci.com/g/PrivateBin/PrivateBin/?branch=master)
|
|
||||||
|
|
||||||
*Current version: 1.2.1*
|
*Current version: 1.3*
|
||||||
|
|
||||||
**PrivateBin** is a minimalist, open source online [pastebin](https://en.wikipedia.org/wiki/Pastebin)
|
**PrivateBin** is a minimalist, open source online [pastebin](https://en.wikipedia.org/wiki/Pastebin)
|
||||||
where the server has zero knowledge of pasted data.
|
where the server has zero knowledge of pasted data.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* When there is no script at all other */
|
/* When there is no script at all other */
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* CSS Reset from YUI 3.4.1 (build 4118) - Copyright 2011 Yahoo! Inc. All rights reserved.
|
/* CSS Reset from YUI 3.4.1 (build 4118) - Copyright 2011 Yahoo! Inc. All rights reserved.
|
||||||
|
|||||||
@@ -155,11 +155,11 @@
|
|||||||
"Could not get paste data: %s":
|
"Could not get paste data: %s":
|
||||||
"Text konnte nicht geladen werden: %s",
|
"Text konnte nicht geladen werden: %s",
|
||||||
"QR code": "QR code",
|
"QR code": "QR code",
|
||||||
"I love you too, bot…": "I love you too, bot…",
|
"I love you too, bot…": "Ich mag Dich auch, bot…",
|
||||||
"This website is using an insecure HTTP connection! Please use it only for testing.":
|
"This website is using an insecure HTTP connection! Please use it only for testing.":
|
||||||
"This website is using an insecure HTTP connection! Please use it only for testing.",
|
"Diese Webseite verwendet eine unsichere HTTP Verbindung! Bitte benutze sie nur zum Testen.",
|
||||||
"For more information <a href=\"%s\">see this FAQ entry</a>.":
|
"For more information <a href=\"%s\">see this FAQ entry</a>.":
|
||||||
"For more information <a href=\"%s\">see this FAQ entry</a>.",
|
"<a href=\"%s\">Besuche diesen FAQ Eintrag</a> für weitere Informationen dazu.",
|
||||||
"Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>.":
|
"Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>.":
|
||||||
"Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>."
|
"Dein Browser benötigt möglicherweise eine HTTPS Verbindung um das WebCrypto API nutzen zu können. Versuche <a href=\"%s\">auf HTTPS zu wechseln</a>."
|
||||||
}
|
}
|
||||||
|
|||||||
16
i18n/fr.json
16
i18n/fr.json
@@ -87,7 +87,7 @@
|
|||||||
"FOR YOUR EYES ONLY. Don't close this window, this message can't be displayed again.":
|
"FOR YOUR EYES ONLY. Don't close this window, this message can't be displayed again.":
|
||||||
"POUR VOS YEUX UNIQUEMENT. Ne fermez pas cette fenêtre, ce paste ne pourra plus être affiché.",
|
"POUR VOS YEUX UNIQUEMENT. Ne fermez pas cette fenêtre, ce paste ne pourra plus être affiché.",
|
||||||
"Could not decrypt comment; Wrong key?":
|
"Could not decrypt comment; Wrong key?":
|
||||||
"Impossible de déchiffrer le commentaire ; mauvaise clé ?",
|
"Impossible de déchiffrer le commentaire; mauvaise clé ?",
|
||||||
"Reply":
|
"Reply":
|
||||||
"Répondre",
|
"Répondre",
|
||||||
"Anonymous":
|
"Anonymous":
|
||||||
@@ -139,8 +139,8 @@
|
|||||||
"Cloned: '%s'": "Cloner '%s'",
|
"Cloned: '%s'": "Cloner '%s'",
|
||||||
"The cloned file '%s' was attached to this paste.": "Le fichier cloné '%s' a été attaché à ce paste.",
|
"The cloned file '%s' was attached to this paste.": "Le fichier cloné '%s' a été attaché à ce paste.",
|
||||||
"Attach a file": "Attacher un fichier ",
|
"Attach a file": "Attacher un fichier ",
|
||||||
"alternatively drag & drop a file or paste an image from the clipboard": "alternatively drag & drop a file or paste an image from the clipboard",
|
"alternatively drag & drop a file or paste an image from the clipboard": "alternativement, glisser & déposer un fichier ou coller une image à partir du presse-papiers",
|
||||||
"File too large, to display a preview. Please download the attachment.": "File too large, to display a preview. Please download the attachment.",
|
"File too large, to display a preview. Please download the attachment.": "Fichier trop volumineux, pour afficher un aperçu. Veuillez télécharger la pièce jointe.",
|
||||||
"Remove attachment": "Enlever l'attachement",
|
"Remove attachment": "Enlever l'attachement",
|
||||||
"Your browser does not support uploading encrypted files. Please use a newer browser.":
|
"Your browser does not support uploading encrypted files. Please use a newer browser.":
|
||||||
"Votre navigateur ne supporte pas l'envoi de fichiers chiffrés. Merci d'utiliser un navigateur plus récent.",
|
"Votre navigateur ne supporte pas l'envoi de fichiers chiffrés. Merci d'utiliser un navigateur plus récent.",
|
||||||
@@ -162,13 +162,13 @@
|
|||||||
"Si ce message ne disparaîssait pas, jetez un oeil à <a href=\"%s\">cette FAQ pour des idées de résolution</a> (en Anglais).",
|
"Si ce message ne disparaîssait pas, jetez un oeil à <a href=\"%s\">cette FAQ pour des idées de résolution</a> (en Anglais).",
|
||||||
"+++ no paste text +++": "+++ pas de paste-text +++",
|
"+++ no paste text +++": "+++ pas de paste-text +++",
|
||||||
"Could not get paste data: %s":
|
"Could not get paste data: %s":
|
||||||
"Could not get paste data: %s",
|
"Impossible d'obtenir les données du paste: %s",
|
||||||
"QR code": "QR code",
|
"QR code": "QR code",
|
||||||
"I love you too, bot…": "I love you too, bot…",
|
"I love you too, bot…": "Je t’aime aussi, bot…",
|
||||||
"This website is using an insecure HTTP connection! Please use it only for testing.":
|
"This website is using an insecure HTTP connection! Please use it only for testing.":
|
||||||
"This website is using an insecure HTTP connection! Please use it only for testing.",
|
"Ce site web utilise une connexion HTTP non sécurisée ! Veuillez l’utiliser uniquement pour des tests.",
|
||||||
"For more information <a href=\"%s\">see this FAQ entry</a>.":
|
"For more information <a href=\"%s\">see this FAQ entry</a>.":
|
||||||
"For more information <a href=\"%s\">see this FAQ entry</a>.",
|
"Pour plus d'informations <a href=\"%s\">consultez cette rubrique de la FAQ</a>.",
|
||||||
"Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>.":
|
"Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>.":
|
||||||
"Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>."
|
"Votre navigateur peut nécessiter une connexion HTTPS pour prendre en charge l’API WebCrypto. Essayez <a href=\"%s\">de passer en HTTPS</a>."
|
||||||
}
|
}
|
||||||
|
|||||||
14
i18n/oc.json
14
i18n/oc.json
@@ -30,7 +30,7 @@
|
|||||||
"Wrong deletion token. Paste was not deleted.":
|
"Wrong deletion token. Paste was not deleted.":
|
||||||
"Geton de supression incorrècte. Lo tèxte es pas estat suprimit.",
|
"Geton de supression incorrècte. Lo tèxte es pas estat suprimit.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Lo tèxte es estat correctament suprimit.",
|
"Lo tèxte es estat corrèctament suprimit.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
||||||
"JavaScript es requesit per far foncionar %s. <br />O planhèm per l’inconvenient.",
|
"JavaScript es requesit per far foncionar %s. <br />O planhèm per l’inconvenient.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
"unknown status":
|
"unknown status":
|
||||||
"Estatut desconegut",
|
"Estatut desconegut",
|
||||||
"server error or not responding":
|
"server error or not responding":
|
||||||
"Lo servidor respond pas o a rencontrat una error",
|
"Lo servidor respond pas o a rescontrat una error",
|
||||||
"Could not post comment: %s":
|
"Could not post comment: %s":
|
||||||
"Impossible de mandar lo comentari : %s",
|
"Impossible de mandar lo comentari : %s",
|
||||||
"Sending paste…":
|
"Sending paste…":
|
||||||
@@ -159,16 +159,16 @@
|
|||||||
"Decrypting paste…": "Deschirament del tèxte…",
|
"Decrypting paste…": "Deschirament del tèxte…",
|
||||||
"Preparing new paste…": "Preparacion…",
|
"Preparing new paste…": "Preparacion…",
|
||||||
"In case this message never disappears please have a look at <a href=\"%s\">this FAQ for information to troubleshoot</a>.":
|
"In case this message never disappears please have a look at <a href=\"%s\">this FAQ for information to troubleshoot</a>.":
|
||||||
"Se per cas aqueste messatge quita pas de s’afichar mercés de gaitar <a href=\"%s\">aquesta FAQ per las solucions</a> (en anglés).",
|
"Se per cas aqueste messatge quite pas de s’afichar mercés de gaitar <a href=\"%s\">aquesta FAQ per las solucions</a> (en anglés).",
|
||||||
"+++ no paste text +++": "+++ cap de tèxte pegat +++",
|
"+++ no paste text +++": "+++ cap de tèxte pegat +++",
|
||||||
"Could not get paste data: %s":
|
"Could not get paste data: %s":
|
||||||
"Recuperacion impossibla de las donadas copiadas : %s",
|
"Recuperacion impossibla de las donadas copiadas : %s",
|
||||||
"QR code": "Còdi QR",
|
"QR code": "Còdi QR",
|
||||||
"I love you too, bot…": "I love you too, bot…",
|
"I love you too, bot…": "T’aimi tanben, robòt…",
|
||||||
"This website is using an insecure HTTP connection! Please use it only for testing.":
|
"This website is using an insecure HTTP connection! Please use it only for testing.":
|
||||||
"This website is using an insecure HTTP connection! Please use it only for testing.",
|
"Aqueste site utiliza una connexion HTTP pas segura ! Mercés de l’utilizar pas que per d’ensages.",
|
||||||
"For more information <a href=\"%s\">see this FAQ entry</a>.":
|
"For more information <a href=\"%s\">see this FAQ entry</a>.":
|
||||||
"For more information <a href=\"%s\">see this FAQ entry</a>.",
|
"Per mai d’informacions <a href=\"%s\">vejatz aqueste article de FAQ</a>.",
|
||||||
"Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>.":
|
"Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>.":
|
||||||
"Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>."
|
"Se pòt que vòstre navigator faga besonh d’una connexion HTTPS per èsser compatible amb l’API WebCrypto. Ensajatz de <a href=\"%s\">passar al HTTPS</a>."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// change this, if your php files and data is outside of your webservers document root
|
// change this, if your php files and data is outside of your webservers document root
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "privatebin",
|
"name": "privatebin",
|
||||||
"version": "1.2.1",
|
"version": "1.3",
|
||||||
"description": "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bit AES in Galois Counter mode (GCM).",
|
"description": "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bit AES in Galois Counter mode (GCM).",
|
||||||
"main": "privatebin.js",
|
"main": "privatebin.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @see {@link https://github.com/PrivateBin/PrivateBin}
|
* @see {@link https://github.com/PrivateBin/PrivateBin}
|
||||||
* @copyright 2012 Sébastien SAUVAGE ({@link http://sebsauvage.net})
|
* @copyright 2012 Sébastien SAUVAGE ({@link http://sebsauvage.net})
|
||||||
* @license {@link https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License}
|
* @license {@link https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License}
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
* @name PrivateBin
|
* @name PrivateBin
|
||||||
* @namespace
|
* @namespace
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin;
|
namespace PrivateBin;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin;
|
namespace PrivateBin;
|
||||||
@@ -28,7 +28,7 @@ class Controller
|
|||||||
*
|
*
|
||||||
* @const string
|
* @const string
|
||||||
*/
|
*/
|
||||||
const VERSION = '1.2.1';
|
const VERSION = '1.3';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* minimal required PHP version
|
* minimal required PHP version
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin\Data;
|
namespace PrivateBin\Data;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin\Data;
|
namespace PrivateBin\Data;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin\Data;
|
namespace PrivateBin\Data;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin;
|
namespace PrivateBin;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin;
|
namespace PrivateBin;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin;
|
namespace PrivateBin;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin;
|
namespace PrivateBin;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin;
|
namespace PrivateBin;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin\Model;
|
namespace PrivateBin\Model;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin\Model;
|
namespace PrivateBin\Model;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin\Model;
|
namespace PrivateBin\Model;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin\Persistence;
|
namespace PrivateBin\Persistence;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin\Persistence;
|
namespace PrivateBin\Persistence;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin\Persistence;
|
namespace PrivateBin\Persistence;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin\Persistence;
|
namespace PrivateBin\Persistence;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin;
|
namespace PrivateBin;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @link https://github.com/PrivateBin/PrivateBin
|
* @link https://github.com/PrivateBin/PrivateBin
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 1.2.1
|
* @version 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin;
|
namespace PrivateBin;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
* @link http://sebsauvage.net/wiki/doku.php?id=php:vizhash_gd
|
* @link http://sebsauvage.net/wiki/doku.php?id=php:vizhash_gd
|
||||||
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
||||||
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
* @license https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
||||||
* @version 0.0.5 beta PrivateBin 1.2.1
|
* @version 0.0.5 beta PrivateBin 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PrivateBin;
|
namespace PrivateBin;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ if ($MARKDOWN):
|
|||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.11.js" integrity="sha512-p7UyJuyBkhMcMgE4mDsgK0Lz70OvetLefua1oXs1OujWv9gOxh4xy8InFux7bZ4/DAZsTmO4rgVwZW9BHKaTaw==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.11.js" integrity="sha512-p7UyJuyBkhMcMgE4mDsgK0Lz70OvetLefua1oXs1OujWv9gOxh4xy8InFux7bZ4/DAZsTmO4rgVwZW9BHKaTaw==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-Yq2HyT+H1PmQxCaDeh6E/ChOrTBSYsu8BuS4yb8UPHlyMVaxqSOtyfy6hx6vAsVT0G3bKeLRAuejhvPTOoz7fQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-dNBKGlXagUZhkKcI+HhEH0otOswA5g2QnJV8BxYxNK/piW9jJWZvADCbzDJNRjt6A6QgMwBM8+lH7K3lgsOuQw==" crossorigin="anonymous"></script>
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;}</style>
|
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ if ($MARKDOWN):
|
|||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.11.js" integrity="sha512-p7UyJuyBkhMcMgE4mDsgK0Lz70OvetLefua1oXs1OujWv9gOxh4xy8InFux7bZ4/DAZsTmO4rgVwZW9BHKaTaw==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.11.js" integrity="sha512-p7UyJuyBkhMcMgE4mDsgK0Lz70OvetLefua1oXs1OujWv9gOxh4xy8InFux7bZ4/DAZsTmO4rgVwZW9BHKaTaw==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-Yq2HyT+H1PmQxCaDeh6E/ChOrTBSYsu8BuS4yb8UPHlyMVaxqSOtyfy6hx6vAsVT0G3bKeLRAuejhvPTOoz7fQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-dNBKGlXagUZhkKcI+HhEH0otOswA5g2QnJV8BxYxNK/piW9jJWZvADCbzDJNRjt6A6QgMwBM8+lH7K3lgsOuQw==" crossorigin="anonymous"></script>
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;}</style>
|
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ class ConfigurationTestGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$code .= $this->_getFunction(
|
$code .= $this->_getFunction(
|
||||||
ucfirst($step), $key, $options, $preCode, $testCode
|
ucfirst($step), $key, $options, $preCode, $testCode, $fullOptions['main']['discussion']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -408,10 +408,11 @@ class ConfigurationTestGenerator
|
|||||||
* DO NOT EDIT: This file is generated automatically using configGenerator.php
|
* DO NOT EDIT: This file is generated automatically using configGenerator.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use PrivateBin\PrivateBin;
|
use PrivateBin\Controller;
|
||||||
use PrivateBin\Data\Filesystem;
|
use PrivateBin\Data\Filesystem;
|
||||||
use PrivateBin\Persistence\ServerSalt;
|
use PrivateBin\Persistence\ServerSalt;
|
||||||
use PrivateBin\Persistence\TrafficLimiter;
|
use PrivateBin\Persistence\TrafficLimiter;
|
||||||
|
use PrivateBin\Request;
|
||||||
|
|
||||||
class ConfigurationCombinationsTest extends PHPUnit_Framework_TestCase
|
class ConfigurationCombinationsTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
@@ -448,8 +449,8 @@ class ConfigurationCombinationsTest extends PHPUnit_Framework_TestCase
|
|||||||
if ($this->_model->exists(Helper::getPasteId()))
|
if ($this->_model->exists(Helper::getPasteId()))
|
||||||
$this->_model->delete(Helper::getPasteId());
|
$this->_model->delete(Helper::getPasteId());
|
||||||
$configuration['model_options']['dir'] = $this->_path;
|
$configuration['model_options']['dir'] = $this->_path;
|
||||||
$configuration['traffic']['dir'] = $this->_path;
|
$configuration['traffic']['dir'] = $this->_path;
|
||||||
$configuration['purge']['dir'] = $this->_path;
|
$configuration['purge']['dir'] = $this->_path;
|
||||||
Helper::createIniFile(CONF, $configuration);
|
Helper::createIniFile(CONF, $configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -467,7 +468,7 @@ EOT;
|
|||||||
* @param array $testCode
|
* @param array $testCode
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function _getFunction($step, $key, &$options, $preCode, $testCode)
|
private function _getFunction($step, $key, &$options, $preCode, $testCode, $discussionEnabled)
|
||||||
{
|
{
|
||||||
if (count($testCode) == 0) {
|
if (count($testCode) == 0) {
|
||||||
echo "skipping creation of test$step$key, no valid tests found for configuration: $options" . PHP_EOL;
|
echo "skipping creation of test$step$key, no valid tests found for configuration: $options" . PHP_EOL;
|
||||||
@@ -495,18 +496,31 @@ EOT;
|
|||||||
// step specific initialization
|
// step specific initialization
|
||||||
switch ($step) {
|
switch ($step) {
|
||||||
case 'Create':
|
case 'Create':
|
||||||
|
if ($discussionEnabled) {
|
||||||
|
$code .= PHP_EOL . <<<'EOT'
|
||||||
|
$paste = Helper::getPasteJson();
|
||||||
|
EOT;
|
||||||
|
} else {
|
||||||
|
$code .= PHP_EOL . <<<'EOT'
|
||||||
|
$paste = json_decode(Helper::getPasteJson(), true);
|
||||||
|
$paste['adata'][2] = 0;
|
||||||
|
$paste = json_encode($paste);
|
||||||
|
EOT;
|
||||||
|
}
|
||||||
$code .= PHP_EOL . <<<'EOT'
|
$code .= PHP_EOL . <<<'EOT'
|
||||||
$_POST = Helper::getPaste();
|
$file = tempnam(sys_get_temp_dir(), 'FOO');
|
||||||
|
file_put_contents($file, $paste);
|
||||||
|
Request::setInputStream($file);
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$_SERVER['REMOTE_ADDR'] = '::1';
|
$_SERVER['REMOTE_ADDR'] = '::1';
|
||||||
TrafficLimiter::canPass();
|
TrafficLimiter::canPass();
|
||||||
EOT;
|
EOT;
|
||||||
break;
|
break;
|
||||||
case 'Read':
|
case 'Read':
|
||||||
$code .= PHP_EOL . <<<'EOT'
|
$code .= PHP_EOL . <<<'EOT'
|
||||||
$this->_model->create(Helper::getPasteId(), Helper::getPaste());
|
$this->_model->create(Helper::getPasteId(), Helper::getPaste());
|
||||||
$_SERVER['QUERY_STRING'] = Helper::getPasteId();
|
$_SERVER['QUERY_STRING'] = Helper::getPasteId();
|
||||||
$_GET[Helper::getPasteId()] = '';
|
$_GET[Helper::getPasteId()] = '';
|
||||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
|
||||||
EOT;
|
EOT;
|
||||||
@@ -525,7 +539,7 @@ EOT;
|
|||||||
$code .= PHP_EOL . $preString;
|
$code .= PHP_EOL . $preString;
|
||||||
$code .= <<<'EOT'
|
$code .= <<<'EOT'
|
||||||
ob_start();
|
ob_start();
|
||||||
new PrivateBin;
|
new Controller;
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
EOT;
|
EOT;
|
||||||
|
|||||||
Reference in New Issue
Block a user