Commit Graph

55 Commits

Author SHA1 Message Date
rugk
47c986a781 fix(test): fix directory separator actually being used everywhere 2026-02-23 13:55:16 +00:00
El RIDO
d00fb264fb deduplicate code, clarifications 2026-01-25 10:37:32 +01:00
El RIDO
520408b830 typos 2026-01-25 10:36:10 +01:00
El RIDO
b4db5f8e57 apply null coalescing operator, strict equality, avoid aliases, prefer empty 2025-11-20 08:19:14 +01:00
El RIDO
dae5f7fd61 partially revert #1559
Instead of automatically adding custom templates, we log an error if
that template is missing in the available templates. Still mitigates
arbitrary file inclusion, as the string is now checked against a fixed
allow list.
2025-11-10 17:31:35 +01:00
El RIDO
85962a537a fix php unit tests & SRI hash 2025-10-06 23:53:13 +02:00
El RIDO
f7cf389f36 remove v1 backend support and version checks in the frontend 2025-07-05 17:21:12 +02:00
El RIDO
50a695b609 add missing method added upstream 2025-04-23 19:14:47 +02:00
El RIDO
e27e3ace16 fix google cloud sdk tests
Adds new method required by interface since https://github.com/googleapis/google-cloud-php/pull/7966
2025-01-11 20:37:50 +01:00
El RIDO
c27c18faf9 fix google cloud sdk tests
Adds new method required by interface since https://github.com/googleapis/google-cloud-php/pull/7966
2025-01-11 20:29:03 +01:00
El RIDO
0268e01ab5 experiment: add return types to a unit test facility 2024-10-25 07:09:13 +02:00
El RIDO
93a2b97d69 add failing test case, dedup code 2024-10-23 08:17:13 +02:00
El RIDO
4b6c8356f5 clarify use of cache buster, avoid using regex 2024-07-09 22:35:21 +02:00
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