Commit Graph

150 Commits

Author SHA1 Message Date
c9dce8f782
Annotate the available tests as @small 2023-11-06 23:26:21 +01:00
0c0d059dd3
Add testsuite for /tests directory in phpunit.xml 2023-11-06 23:03:35 +01:00
5d80f82040
Remove printer class / use testdox by default in phpunit setup 2023-11-06 23:02:44 +01:00
5c2c1a47cc
Fully ensure all URL components are present for rewriting 2023-11-05 23:37:28 +01:00
ae12cfdf0f
Add tests for MD_STD_IN::sanitize_url() and ensure it supports rewriting
unencoded cyrillic inputs

Close #7
2023-11-05 23:29:14 +01:00
2176e7312b
Remove MD_STD_CACHE open_redis_default() 2023-10-05 16:58:48 +02:00
3ece870f0c
Require externally set up redis connection for caching + serving full pages via
redis
2023-10-05 16:45:35 +02:00
b143845aea
Fix type-safety issues around curl in new checking HTTP status function 2023-08-18 15:12:45 +02:00
88458df949
Add general abstract classes for tests, starting with test classes for
RSS feeds
2023-08-18 15:09:58 +02:00
9c49afe416
Improve comment on return parameter 2023-08-16 20:09:22 +02:00
6426947e60
Add function for getting user language without using cookies 2023-08-14 15:15:41 +02:00
a8599667c9
Use is_file() over file_exists() in MD_STD::ensure_file() 2023-07-21 16:09:43 +02:00
bb36388e7e
Add README 2023-06-24 02:04:03 +02:00
66a5b77b51
Add function unlink_if_exists 2023-04-14 14:13:09 +02:00
23232f4e6a
Remove superfluous variable assignments 2022-09-15 21:38:41 +02:00
c38f0146dc
Allow passing existing redis connections to MD_STD_CACHE 2022-09-04 23:27:04 +02:00
bbac217aa0
Reduce factors for setting anti-brute force delays 2022-08-14 18:12:33 +02:00
ced5a65122
Fix variable misnomers in MD_STD_SEC 2022-08-14 16:17:03 +02:00
52aeedd31e
Set a cap to maximum delay in preventing brute force attacks
This is necessary because PHP-FPM fails if sleep / usleep runs beyond
the maximum execution time of php.ini, leading to whole vhosts falling
over.
2022-08-14 13:08:40 +02:00
f477401114
Add functions for validating longitudes and latitutdes 2022-07-28 11:01:30 +02:00
c362aa1283
Remove superfluous checks for empty realnames 2022-03-31 14:38:02 +02:00
65aaea4097
Check links for using an accepted scheme during validation (http, https,
ftp)
2022-03-30 13:03:04 +02:00
7c02bbb8ad
Fix function comment for setting content-security-policies 2022-03-29 17:51:21 +02:00
6a7b8bd8fd
Disable setting language cookie for curl or clients without user agents 2022-03-26 16:49:10 +01:00
8d7b270f6f
Allow setting worker-src in MD_STD_SEC 2022-03-24 23:25:05 +01:00
9507387c8a
Fix bug in validating ISBN 13s 2022-03-11 23:31:41 +01:00
589161219f
Require numbers OR special chars for passwords, not AND 2022-03-09 00:16:55 +01:00
e18b649250
Return array of error messages on password validate 2022-03-08 21:23:45 +01:00
5bb863ffc9
Add function validate_password 2022-03-08 20:12:54 +01:00
1b63951b44
Enable TCP Fast-Open for outgoing curl requests 2022-02-12 23:06:53 +01:00
93991225fe
Use curl_setopt_array and enable http2 for speeding up CURL requests 2022-02-12 22:51:42 +01:00
321609306d
Use strip tags in sanitize_text over deprecated FILTER_SANITIZE_STRING 2022-02-02 02:18:33 +01:00
2a333c1de6
Simplify MD_STD::startsWithAny 2022-01-16 15:19:40 +01:00
c689f7568f
Allow empty input haystacks in MD_STD::stri_contains() 2022-01-09 22:20:05 +01:00
dc86540da2
Explicitly expect positive ints for depths in MD_STD::json_encode 2022-01-08 01:09:57 +01:00
e50f1f0526
Remove superfluous parentheses 2021-12-24 02:01:53 +01:00
e2ada291f7
Fix bug in splitting int arrays, add function for splitting string
arrays
2021-12-14 03:16:11 +01:00
aa7a3c5012
Clarify prevention of empty returns in array splitter 2021-11-30 00:45:02 +01:00
3f37dd7a9e
Improve phpdoc types, type-safety 2021-11-29 22:30:28 +01:00
86c8235dae
Specify MDJsonEncodingFailedException for failure to encode JSON through
MD_STD::json_encode
2021-11-26 03:23:07 +01:00
8f5174e90d
Move to rather locking down based on user accounts than on IP in
MD_STD_SEC, use class constants for more obvious code
2021-11-25 01:09:08 +01:00
80af1ef260
Add function for opening redis connection using default settings 2021-11-22 23:44:53 +01:00
eb869071b8
Add class for splitting a list into lists of a predefined size 2021-11-16 14:40:38 +01:00
e19e0c875c
Add function for batch validating ids in an array 2021-11-03 02:41:22 +01:00
245d161805
Add function stri_contains for case-insensitive, but intuitive
str_contains
2021-09-28 01:15:51 +02:00
a1e6d7773b
Fix error in sorting a searched list by an inherent value 2021-09-26 19:25:07 +02:00
d35e3ed003
Fix error in sorting by external list 2021-09-26 19:23:42 +02:00
9113cad57e
Add new class MD_STD_SORT to provide useful sorting tools 2021-09-26 01:02:18 +02:00
143a4680e2
Add validation function for phone numbers 2021-09-25 21:56:01 +02:00
a6ebab3e03
Remove superfluous parentheses 2021-09-17 15:52:37 +02:00