Compare commits

...

4 Commits

7 changed files with 33 additions and 3 deletions

1
.gitignore vendored
View File

@ -38,3 +38,4 @@ tst/ConfigurationCombinationsTest.php
.c9
/.idea/
*.iml
paste.log

12
README.chapril.md Normal file
View File

@ -0,0 +1,12 @@
# Construire une version Chapril de privatebin
```
git fetch --all
export VERSION=1.6.0
git rebase ${VERSION?}
# [... Résoudre les conflits]
git tag ${VERSION?}-chapril
git push --tags origin # Pousser le tag côté forge April
git archive -o /tmp/chapril-paste-${VERSION?}.tar.gz --prefix=chapril-paste-${VERSION?}/ ${VERSION?}-chapril
```

View File

@ -1,6 +1,6 @@
{
"PrivateBin": "PrivateBin",
"%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted %sin the browser%s using 256 bits AES.": "%s est un 'pastebin' (ou gestionnaire d'extraits de texte et de code source) minimaliste et open source, dans lequel le serveur n'a aucune connaissance des données envoyées. Les données sont chiffrées/déchiffrées %sdans le navigateur%s par un chiffrement AES 256 bits.",
"%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted %sin the browser%s using 256 bits AES.": "%s est un 'pastebin' (ou gestionnaire d'extraits de texte et de code source) minimaliste et libre, dans lequel le serveur n'a aucune connaissance des données envoyées. Les données sont chiffrées/déchiffrées %sdans le navigateur%s par un chiffrement AES 256 bits.",
"More information on the <a href=\"https://privatebin.info/\">project page</a>.": "Plus d'informations sur <a href=\"https://privatebin.info/\">la page du projet</a>.",
"Because ignorance is bliss": "Vivons heureux, vivons cachés",
"en": "fr",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 B

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 749 B

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -96,7 +96,8 @@ class Filesystem extends AbstractData
if (!is_dir($storagedir)) {
mkdir($storagedir, 0700, true);
}
return $this->_store($file, $paste);
self::logToChapril("CREATE",$pasteid);
return self::_store($file, $paste);
}
/**
@ -114,6 +115,7 @@ class Filesystem extends AbstractData
) {
return false;
}
self::logToChapril("READ",$pasteid);
return self::upgradePreV1Format($paste);
}
@ -145,6 +147,7 @@ class Filesystem extends AbstractData
$dir->close();
rmdir($discdir);
}
self::logToChapril("DELETE",$pasteid);
}
}
@ -199,7 +202,8 @@ class Filesystem extends AbstractData
if (!is_dir($storagedir)) {
mkdir($storagedir, 0700, true);
}
return $this->_store($file, $comment);
self::logToChapril("COMMENT",$pasteid);
return self::_store($file, $comment);
}
/**
@ -527,4 +531,17 @@ class Filesystem extends AbstractData
}
unlink($srcFile);
}
/**
* Add log
*
* @access private
* @return bool
*/
private function logToChapril($message, $id=null)
{
$today = date('Y-m-d H:i:s');
$texte_retour="$today $message \t$id\n";
return (bool) file_put_contents("/var/www/paste.chapril.org/paste.log",$texte_retour,FILE_APPEND|LOCK_EX);
}
}