Commit Graph

209 Commits

Author SHA1 Message Date
El RIDO
81b00dd422
fixing page template, removing error messages when markdown or source are disabled in configuration, re-removing unnecessary spans 2017-03-12 14:16:08 +01:00
El RIDO
fb99d5bb93
Merge branch 'master' into jsrefactor and fixing baseUri unit test 2017-03-05 12:11:55 +01:00
El RIDO
823adb78ef
bumping required PHP to 5.4, removing unneccessary code, resolves #186 2017-03-05 11:22:24 +01:00
El RIDO
d358271451
making unit tests work with spans 2017-03-02 19:44:43 +01:00
El RIDO
131e08ca33
made phpUnit and most mocha tests work again, had to remove some injected objects and added a helper method to facilitate a cache reset for the unit tests. Page template is still broken and the JS test for baseUri() fails 2017-02-25 09:35:55 +01:00
El RIDO
db307c3a77
updated test cases and delete logic to properly implement documented API, thanks @r4sas #188 2017-02-22 21:42:14 +01:00
El RIDO
1457b5ec6a
ensuring tests will work with PHP 5.4, the currently oldest supported version 2017-02-12 15:16:29 +01:00
El RIDO
fdef8bc5be
starting to work on JSVerify & Mocha based unit tests for our JS code base 2017-01-29 14:31:44 +01:00
El RIDO
a7de0e095b
added supported language, updated credits and changelog 2017-01-10 20:37:14 +01:00
El RIDO
67f6c4eb61
turned bootstrap template variants into logic 2017-01-08 10:02:07 +01:00
El RIDO
06496f2ede
updated View test to test every available template instead of just the page one 2017-01-08 08:28:05 +01:00
El RIDO
f79c00378b
Choosing correct Occitan plural formula, added unit tests for Occitan and Chinese, corrected casing of languages in unit test 2017-01-08 07:56:56 +01:00
El RIDO
a5d91298ff
add an option to change the site name, solves #154 2017-01-01 16:33:11 +01:00
El RIDO
4a036aea80
updated SRI hashes, added missing formula for slowene plurals and unit test for it, updated credits and changelog 2017-01-01 14:35:39 +01:00
El RIDO
577031cc1f
written unit test to reproduce #149 2016-12-25 12:04:47 +01:00
El RIDO
ecd8a51137
writing a unit test for #145 lead to the discovery of two errors in the polish translations: error in formula and missing number placeholders in the translation strings 2016-12-25 11:37:45 +01:00
El RIDO
0506ac018d
correcting instructions based on Ubuntu 16.04 2016-12-25 10:58:35 +01:00
El RIDO
f49927712a
updated documentation and credits 2016-11-13 11:01:51 +01:00
rugk
f628ac78f8
Fix style of operator spaces 2016-10-31 11:32:12 +01:00
El RIDO
1f46823942
applying patch based on StyleCI ruleset 2016-10-29 10:24:08 +02:00
rugk
ec7af3a738
Improve formatting 2016-09-14 23:55:55 +02:00
El RIDO
e925833090 bumping version number to 1.0 2016-08-25 09:53:31 +02:00
El RIDO
3d7b35aed4 PSR-2/4 fixes 2016-08-22 16:20:14 +02:00
El RIDO
f72e260ee7 adding subresource integrity hashes for all javascript includes, resolves #6 2016-08-16 11:11:03 +02:00
rugk
75cb771e4b Merge branch 'master' into prng, resolve merge conflicts 2016-08-15 18:15:57 +02:00
El RIDO
bd5a15bcab Merge branch 'master' of github.com:PrivateBin/PrivateBin 2016-08-15 10:56:10 +02:00
El RIDO
0a628e83c1 Merge pull request #59 from PrivateBin/52-identicons
Implementation of Identicons library
2016-08-12 12:22:20 +02:00
El RIDO
390ef09764 minor cleanup 2016-08-11 15:03:48 +02:00
El RIDO
6cb7454d07 Added tests for JSON errors, should help us figure out the cause of the problem in #11 2016-08-11 14:41:52 +02:00
rugk
bea9a577a6 Use better random number generator #29 2016-08-10 23:15:06 +02:00
El RIDO
3988b860b0 implemented Identicon library as new default for comment icons, made Vizhash an optional alternative, refactored Vizhash and removed string lenghtening 2016-08-10 17:41:46 +02:00
El RIDO
3fa0881c07 updated documentation, small cleanups 2016-08-09 12:21:32 +02:00
El RIDO
b45bef8388 Renamed classes for full PSR-2 compliance, some cleanup 2016-08-09 11:54:42 +02:00
El RIDO
9bde729cb5 Merge pull request #54 from Sobak/coding-style
Coding style
2016-08-04 15:58:46 +02:00
El RIDO
8e55eafd89 fixing "risky" unit tests 2016-08-02 10:29:25 +02:00
Sobak
5d7003ecc1 Convert to PSR-2 coding style (using phpcs-fixer) 2016-07-26 08:19:35 +02:00
Simon Rupf
d14eb0efe4 fixing configuration and its test to match the new namespaces 2016-07-25 11:02:39 +02:00
Sobak
54f96b9938 Introduce PSR-4 autoloading 2016-07-22 12:11:48 +02:00
El RIDO
9a9362789b addressing issues with failed attachement uploads due to webserver configuration, resolves #15 2016-07-19 15:26:41 +02:00
rugk
535710cdd6 Add htaccess to prevent template access 2016-07-19 14:43:30 +02:00
El RIDO
c5606a47fe refactoring away RainTPL and templating, resolves #36 2016-07-19 14:02:26 +02:00
El RIDO
7d1dc55a27 actually use local variable (for Codacy) 2016-07-19 08:40:33 +02:00
rugk
d367655c6d Fix build
Thanks https://stackoverflow.com/questions/12346876/php-foreach-that-returns-keys-only#12346910
2016-07-18 18:46:41 +02:00
rugk
e70159c1bb Avoid unused local variables
Funnily you introduced this in a "code quality improve commit" (b53efda635), but Codacy complained about it...
2016-07-18 18:37:18 +02:00
El RIDO
b53efda635 improving code coverage and unit testing 2016-07-18 14:47:32 +02:00
El RIDO
ff0c55c0d6 introduce option to disable vizhash for paranoid admins, resolves #20 point 2.4 2016-07-18 10:14:38 +02:00
El RIDO
f8bc40b4e4 introducing automatic purging of expired pastes, triggered by default at least 5 minutes apart, deleting a maximum of 10 pastes - resolves #3 2016-07-15 17:02:59 +02:00
El RIDO
4d10fd9690 fixing support for pre renaming configuration file format, resolves #37 2016-07-13 09:41:45 +02:00
El RIDO
3b3b5277eb refactoring to improve code quality 2016-07-11 14:15:20 +02:00
El RIDO
79509ad48a renaming the fork to PrivateBin 2016-07-11 11:58:15 +02:00
El RIDO
0e217a42c5 introduce new zerobincompatibility option, replacing the base64 one, if it is enabled, delete tokens use sha256; added per paste salt with server salt fallback; this resolves the points 2.2 & 2.9 in #103 2016-07-06 11:37:13 +02:00
El RIDO
6b0b814dc6 removing leftover from previously using a different function, resolves #83 2016-07-06 09:41:07 +02:00
El RIDO
d664af6ce5 giving up on HHVM unit tests for now, will open an issue for it 2016-07-06 09:16:02 +02:00
El RIDO
c175abaf77 improvements to get the HHVM build to pass 2016-07-06 09:01:10 +02:00
El RIDO
36c1b17777 that variable is required to suppress output when unit testing, also travis has composer preinstalled 2016-07-05 17:52:32 +02:00
El RIDO
8e11f0873c small code style improvements, trying to get phpunit with hhvm to work in travis 2016-07-05 17:23:25 +02:00
El RIDO
9267e281f5 adding support for automatic code coverage generation into codacy 2016-07-05 17:01:26 +02:00
El RIDO
5980f8b603 removing some unused code detected by codacy 2016-07-04 20:46:45 +02:00
El RIDO
a856a50bc3 addressing random unit test failures, resolves #106 2016-07-04 20:21:14 +02:00
El RIDO
e89a8b6898 fixing deprecations with newer phpunit versions 2016-05-22 18:35:07 +02:00
El RIDO
1158c81259 only mock mcrypt if it isn't installed 2016-05-22 17:17:09 +02:00
El RIDO
3a92c940a9 implementing media type negotiation (based on language negotiation
logic) in cases both JSON and (X)HTML are being requested, resolving #68
2016-04-08 23:29:44 +02:00
El RIDO
a4ebdbc606 re-introducing (optional) URL shortener support, resolves #58 2016-01-31 09:56:06 +01:00
El RIDO
24a4328c55 incrementing version, updating changelog, added missing phpdoc comments 2015-11-09 21:39:42 +01:00
El RIDO
42a9c92b5e improved database backend support for larger files (100 KiB - 16 MiB),
introduced database versioning to reduce amount of checks done per
request
2015-11-01 17:02:20 +01:00
El RIDO
d42975580a expire_options and formatter_options should not be filled up with
default values, resolves #52
2015-10-24 08:44:17 +02:00
El RIDO
176dff3b70 renaming config file to make updates easier, resolving #50 2015-10-22 21:13:15 +02:00
El RIDO
5a9879623f added incorrectly ignored unit test file, correcting ignore 2015-10-22 20:51:01 +02:00
El RIDO
ca07398b66 adding option to hide clone button on expiring pastes, resolves #34 2015-10-18 17:56:45 +02:00
El RIDO
f96b0c0afe adding unit tests for all JSON-LD cases 2015-10-18 14:46:07 +02:00
El RIDO
14d08ec56d working on JSON-LD validity, added CORS headers preparing external API
call support
2015-10-18 14:37:58 +02:00
El RIDO
f21567133c changing paste read output for API refactoring 2015-10-18 11:08:28 +02:00
El RIDO
2e3bacb699 fixing deletion issue in request refactoring, starting work on API read
refactoring
2015-10-15 22:04:57 +02:00
El RIDO
1d6cfb7f3b refactoring delete API, added external JSON-LD context 2015-10-11 21:22:00 +02:00
El RIDO
9e6e29bc93 working on API: simplifying PUT request mocking 2015-10-11 18:50:48 +02:00
El RIDO
e5b096ed8c found and fixed a bug when using expiration together with discussion 2015-10-03 17:54:18 +02:00
El RIDO
add980d36f adding UI tests for database configuration, fixed an issue with comment
table creation
2015-10-03 15:52:37 +02:00
El RIDO
7ec94e0db5 implementing request refactoring, beginning JS changes for JSON API, but
discovered that DELETE and PUT are not available on all webservers by
default
2015-09-27 20:34:39 +02:00
El RIDO
6b7dc44039 preparing unit test for request object 2015-09-27 15:37:17 +02:00
El RIDO
ce3f10f143 improving unit tests, fixing regression in DB model 2015-09-27 14:36:20 +02:00
El RIDO
694138c5d4 mostly finished with data model refactoring 2015-09-27 03:03:55 +02:00
El RIDO
211d3e4622 preparing unit test for model refactoring, refactoring traffic limiter 2015-09-26 17:57:46 +02:00
El RIDO
d04eab52c9 refactoring how attachments are stored 2015-09-26 12:29:27 +02:00
El RIDO
22b4c89227 adapting configGenerator for 0.21 2015-09-22 23:45:52 +02:00
El RIDO
6d24ff824e refactoring configuration 2015-09-22 23:21:31 +02:00
El RIDO
0de9f868fa improving unit tests, fixing #38 2015-09-21 22:32:52 +02:00
El RIDO
608605cd54 incrementing version number, updating docs 2015-09-19 17:23:10 +02:00
El RIDO
106141efa4 merging @vikstrous file upload feature for #20 from
8a6d268278
2015-09-16 22:51:48 +02:00
El RIDO
0e53d1ee86 added markdown support and a dropdown for the format selection. The
options other then markdown are plain text and source code (syntax
highlighting). Resolves #25
2015-09-12 17:33:16 +02:00
El RIDO
b060d57524 - implemented php side of plural translation
- using it to generate labels dynamically for the expire options
(deprecating the [expire_labels] configuration).
- added translation of the human readable data sizes to support the
french octet
- fixed IEC label for kibibytes
2015-09-06 19:21:17 +02:00
El RIDO
a2af88a36e initial work on translations, covering the PHP side of it 2015-09-05 02:24:56 +02:00
El RIDO
411419d597 adding tests and unifying paste creation output 2015-09-03 22:55:36 +02:00
El RIDO
b25022e403 refactored JSON API, its now possible to retrieve pastes as JSON, which
is now used when posting comments, eliminating the need to store the
password in sessionStorage
2015-09-01 22:33:07 +02:00
El RIDO
802a0b26b9 burn after reading messages are only deleted after callback by JS when
successfully decrypted, resolves #11
2015-08-31 22:10:41 +02:00
El RIDO
d3c4600806 slight configuration changes, template modifications to make discussions
and password configurable, removed generated configuration test as it
grows quite big and a new one can be generated easily if needed
2015-08-31 00:01:35 +02:00
El RIDO
2d0668af03 concluding work on configuration test generator for #16. Replaced a few
die()s in the code with Exception, making it possible to test properly.
Fixed some outdated unit tests.
2015-08-29 20:29:14 +02:00
El RIDO
99dbb22e21 refining configuration test generator, now supporting conditions on
tests (i.e. if syntax highlighting is false, highlighting should never
be loaded)
2015-08-29 10:41:10 +02:00
El RIDO
1c4d1aa6b6 working on configuration unit test generator as described in #16 2015-08-29 01:26:48 +02:00
El RIDO
d57d6cf44b created initial unit tests for main zerobin class 2015-08-27 23:30:35 +02:00
El RIDO
f775da3931 fixing nasty deletion bug from #15, included unit tests to trigger it
and reworked persistence classes to through exceptions rather to fail
silently
2015-08-27 21:41:21 +02:00
El RIDO
cb28056223 made highlighting more configurable, added all four themes, there is now a configurable flavour text (notice) 2015-08-17 23:18:33 +02:00
El RIDO
49c6e3c1b6 updated base64.js to version 2.1.9, using minified version found at
9192c510f5/base64.min.js
kudos Dan Kogai

small improvements to input checking
implementing default values for most configuration options
switching to versioned JS files to avoid version hack used in template
2015-08-16 12:27:06 +02:00
Sebastien SAUVAGE
43a439e7d0 Time attack protection on hmac comparison
This fixes issue 2.7 of https://defuse.ca/audits/zerobin.htm, and thus
(with commit a24212afda90ca3e4b4ff5ce30d2012709b58a28) also issue 2.8.

(cherry picked from commit 0b4db7ece313dd268e51fc47a0293a649927558a)

Conflicts:
	index.php
2015-08-15 23:44:03 +02:00
El RIDO
ad70051323 reviewed unit tests, fixing line endings, added more tests 2015-08-15 18:32:31 +02:00
Sebastien SAUVAGE
7db76d8d71 Updated json checking.
- adapted to SJCL changed
- added entropy checking (from
f2ee2e8ba2)

(cherry picked from commit 57e6274c64e2c99c754b63586af6b34c374fbc2b)

Conflicts:
	index.php
2015-08-15 18:16:55 +02:00
El RIDO
134d22c958 small unit testing improvements, removing never accessed code 2015-08-15 16:37:44 +02:00
Sebastien SAUVAGE
5b253cf77c ZeroBin 0.17
* added deletion link.
* small refactoring.
* improved regex checks.
* larger server alt on installation.
2013-11-01 01:15:14 +01:00
Simon Rupf
630e16c4a0 Added more configuration options, based on patch by Uli Köhler 2013-10-30 23:54:42 +01:00
Simon Rupf
907538875b removed leftovers from submodule uglifyjs, added credits file,
cleaned up CSS, changed template to output clean XHTML 5,
added unit tests for 60% of the code, found a few bugs by doing
that and fixed them
2012-08-26 00:49:11 +02:00