Commit Graph

42 Commits

Author SHA1 Message Date
El RIDO
3c6df4573e
apply StyleCI recommendation 2024-07-09 22:21:01 +02:00
El RIDO
6261c94fc9
break unit tests if mismatch between JS files and SRI configuration array is detected 2024-07-09 22:20:08 +02:00
El RIDO
118c919663
adjust regex due to StyleCI spacing change 2024-07-09 21:51:19 +02:00
El RIDO
e051cde317
apply StyleCI recommendation 2024-07-09 21:48:40 +02:00
El RIDO
8b3b16be44
SRI hashes are now configurable, no longer hardcoded in templates
- addresses #1365
- should make upgrades easier for those using custom templates
- if the JS files got customized, the default SRI hashes can be replaced in the conf.php file, added commented section in conf.sample.php
2024-07-07 16:36:52 +02:00
El RIDO
3cba170f32
re-order stubs to the end of the file for easier maintenance 2024-07-07 15:10:17 +02:00
El RIDO
cebc9acce6 enable strict types in PHP 2024-06-04 07:13:55 +02:00
El RIDO
a9f1926b96
implement chrono privacy for pastes, addresses #1290 2024-05-01 20:16:03 +02:00
El RIDO
65a626f940 inputs sanitation & remove some obsolete version checks
using filter_vars instead of filter_input, because our unit tests depend on manipulating global arrays, which are not used by filter_input - we would have to mock the function in the unit testing, it therefore is cleaner to use the same code paths in testing as in production

some inputs in I18n and TrafficLimiter remain unfiltered, since we already validate them by other means (IP lib and/or preg_match)

our minimum PHP version is 7.3, so we can drop the two < 5.6 fallback checks
2024-03-23 11:27:25 +01:00
El RIDO
8988899c8c
apply StyleCI patch, fixes #1084 2023-06-18 12:54:22 +02:00
El RIDO
23a2c1829f
deal with annotation reported in github actions 2022-12-12 20:49:04 +01:00
Felix J. Ogris
10013ad092 syntax bot 2022-11-04 21:27:27 +01:00
Felix J. Ogris
3d485ecd7f let GCS backends talk to the same "storage account" during testing 2022-11-04 21:04:18 +01:00
El RIDO
186dd82653
Apply StyleCI fix
that class name we used was not quite correct, but PHP tolerated the typo
2022-02-12 16:41:25 +01:00
El RIDO
af54e70359
apply StyleCI recommendation 2021-06-14 06:48:46 +02:00
El RIDO
3327645fd4
updated doc blocks, comments, fixed indentations, moved some constant strings 2021-06-14 06:44:30 +02:00
El RIDO
68b097087d
apply StyleCI recommendation 2021-06-13 11:16:29 +02:00
El RIDO
93135e0abf
improving code coverage 2021-06-13 10:44:26 +02:00
El RIDO
09162a3c57
fix display of v2 pastes in JS, fixing parsing of comments in PHP, avoid exposing expiration date (we provide time_to_live, would allow calculation of creation date of paste) 2019-05-15 07:44:03 +02:00
El RIDO
cc1c55129f
switching to full JSON API without POST array use, ensure all JSON operations are done with error detection 2019-05-13 22:31:52 +02:00
El RIDO
20befe4bd6
revert errors on STDOUT 2019-05-11 10:37:29 +02:00
El RIDO
a622c8f484
fix logic, avoid 5.5 2019-05-10 23:27:45 +02:00
El RIDO
c3719435a3
and fixing PHP 5.5 2019-05-10 23:09:35 +02:00
El RIDO
7598b28a4a
handling older versions in testing 2019-05-10 22:57:55 +02:00
El RIDO
b1d35057cc
remove further type hints for compatibility 2019-05-10 22:00:34 +02:00
El RIDO
1e44902340
apply StyleCI patch 2019-05-10 21:45:34 +02:00
El RIDO
632d70412a
revert scalar type hints to retain support for PHP < 7.0 2019-05-10 21:35:36 +02:00
El RIDO
700f8a0ea7
made all php unit tests pass again 2019-05-10 07:55:39 +02:00
El RIDO
59569bf9fc
working on JsonApi tests 2019-05-08 22:11:21 +02:00
El RIDO
76dc01b959
finishing changes in models, removing last md5 test cases, tightening up allowed POST data 2019-05-06 22:15:21 +02:00
El RIDO
6e15903f1e
make DatabaseTest work pass again, support reading & writing version 1 & 2 pastes & comments 2019-05-05 14:36:47 +02:00
El RIDO
3338bd792e
implement version 2 format validation, changing ID checksum algorithm, resolves #49 2019-05-03 23:03:57 +02:00
El RIDO
ed676acac3
breaking all the things (by replacing v1 with v2 formats) 2019-05-03 20:51:01 +02:00
El RIDO
5652a43d1d
adding js test to generate v2 example pastes to be used in the development of the server side logic, adding one of these into the helper class of the php tests 2019-04-16 07:45:04 +02:00
El RIDO
da11d2e729
fixing SRI hash generation, broken by yesterdays Cloudflare fix that changed the script tag format 2018-07-01 07:51:05 +02:00
El RIDO
4f06feef81
implemented JSON file conversion on purge and storage in PHP files for data leak protection 2017-10-08 16:59:31 +02:00
El RIDO
7197705d5c
updating unit test in preparation for planned file name change, currently failing 2017-10-08 16:25:11 +02:00
El RIDO
f7853cf439
removing duplicate code, cleanup of temporary test files 2017-03-24 23:42:11 +01:00
El RIDO
1f46823942
applying patch based on StyleCI ruleset 2016-10-29 10:24:08 +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
El RIDO
b45bef8388 Renamed classes for full PSR-2 compliance, some cleanup 2016-08-09 11:54:42 +02:00