Commit Graph

  • 20c33437c9 Add function for checking the mime type of a remove file jrenslin 2021-05-13 22:18:58 +02:00
  • 63d6154d40 Fix spelling in setting language cookie jrenslin 2021-05-13 15:21:06 +02:00
  • d03befe483 Use prefixed cookies for user language jrenslin 2021-05-13 14:48:44 +02:00
  • fe0a8ba83b Remove obsolete phpcs exclusions jrenslin 2021-05-01 22:54:37 +02:00
  • 3b5f20aa96 Add missing "static" keyword in MD_STD jrenslin 2021-04-14 18:16:13 +02:00
  • 56f4fdc88a Add function get_user_lang for getting user language based on cookies jrenslin 2021-04-14 17:59:11 +02:00
  • 919ffdb1b5 Use ++$i over $i++ jrenslin 2021-04-11 21:20:44 +02:00
  • 36bdb36986 Use consistent first uppercase char in MD_STD reference to exception jrenslin 2021-04-09 13:45:19 +02:00
  • 2c1f6a0490 Move scripts to /src subdirectory jrenslin 2021-03-09 20:09:11 +01:00
  • 06bbaf5f97 Ad doption to set start character on an unordered list in md output jrenslin 2021-02-21 01:57:15 +01:00
  • 376333b660 Add class MDFormatter for formatting contents in markdown jrenslin 2021-02-19 00:49:26 +01:00
  • 1b1d33229d Update MD_STD_CACHE to reload error pages jrenslin 2021-02-09 15:18:40 +01:00
  • 8aa9d94acf Remove inline if clauses jrenslin 2021-02-06 20:08:37 +01:00
  • 217e1fc86b Consistently use "null" over "NULL" jrenslin 2021-02-06 19:55:54 +01:00
  • 605fd88b6e Use new line for unsetting variable jrenslin 2021-02-06 17:35:11 +01:00
  • 7a252c6bfa Improve sanitization of color inputs jrenslin 2021-01-30 22:56:00 +01:00
  • 89e06769f1 Add class for validating color codes jrenslin 2021-01-28 21:47:59 +01:00
  • 9d4d326d6a Add check for directory existence in MD_STD::mkdir jrenslin 2021-01-21 11:03:07 +01:00
  • 298e2238a8 Add stricter wrapper around unlink() jrenslin 2021-01-06 12:49:35 +01:00
  • d28c245a1a Add wrapper around mkdir, that throws an exception on errors jrenslin 2020-12-21 14:50:28 +01:00
  • 2b4abf6338 Add function for running multiple curl queries simultaneously jrenslin 2020-12-14 02:01:53 +01:00
  • 34c2d57e5b Add function for converting strings to color codes jrenslin 2020-12-11 14:01:41 +01:00
  • 287fb02f8c Pipe STDOUT to /dev/null in MD_STD::exec_edit, actual STDOUT is for STDERR jrenslin 2020-12-09 13:34:31 +01:00
  • d028ac0176 Remove check for curl init working jrenslin 2020-12-08 20:42:54 +01:00
  • ddab52b1a5 Add check against curl_init failure in runCurl jrenslin 2020-12-08 11:36:54 +01:00
  • ada82f07b6 Reduce multipliers in brute force protection jrenslin 2020-12-07 15:31:36 +01:00
  • cad5b4a6f8 Add missing return statement to disable MD_JAIL::enforce on CLI usage jrenslin 2020-12-06 17:06:43 +01:00
  • 6a7f91ef1d Use shell_exec in exec_edit jrenslin 2020-12-05 20:48:51 +01:00
  • 6db2b4cc1f Add MD_STD::exec_edit to run edit and pipe STDERR to a php exception jrenslin 2020-12-04 21:33:11 +01:00
  • 4c5097701f Add wrapper around levenstein that crops strings to the max allowed length jrenslin 2020-12-03 12:39:47 +01:00
  • 886acead63 Stop using cache in MD_STD_CACHE when run from command line jrenslin 2020-12-02 09:39:43 +01:00
  • 35c0fe4723 Require cached contents in MD_STD_CACHE to be 3 chars long jrenslin 2020-12-01 00:05:59 +01:00
  • a38c3c6fae Let serve_page_through_redis_cache return string jrenslin 2020-11-30 22:36:17 +01:00
  • 57da808a6a Fix class variable comment jrenslin 2020-11-30 19:19:44 +01:00
  • 558ed729dc Add class MD_STD_CACHE jrenslin 2020-11-30 19:08:20 +01:00
  • 14c7ffb8d4 Fix class comment jrenslin 2020-11-23 14:06:03 +01:00
  • a16619b78e Add option to set frame-ancestors CSP jrenslin 2020-11-22 23:27:54 +01:00
  • 90997e4eb5 Add function for sending complete CSP headers jrenslin 2020-11-22 17:45:07 +01:00
  • c60932088d Add missing function comment jrenslin 2020-11-22 15:42:56 +01:00
  • 258781307d Fix reference to incorrect array part in MD_STD_SEC's brute force protection jrenslin 2020-11-22 14:18:08 +01:00
  • dc9d7abe14 Fix comment indentation jrenslin 2020-11-19 23:32:29 +01:00
  • 729a964d0c Reduce general brute force deflection delay multiplier for whole tool to 1.08 (down from 1.2) jrenslin 2020-11-18 00:39:59 +01:00
  • 7120b5dc74 Add function to prevent brute force attacts jrenslin 2020-11-17 23:55:50 +01:00
  • 95537fb60e Extend MD_JAIL with .user_ini proposals for restricting maximum inputs jrenslin 2020-11-12 19:54:43 +01:00
  • 5130477e4b Add static function to propose security settings jrenslin 2020-11-12 00:12:11 +01:00
  • ae39bdf741 Disable currently unused function MD_JAIL->_apply_basedir_restrictions() jrenslin 2020-11-11 17:29:03 +01:00
  • d7c89275e7 Merge branch 'master' of https://gitea.armuli.eu/museum-digital/MD_STD stefan 2020-11-11 17:27:33 +01:00
  • 2bfc7a0dcd Add CLI output option to MD_JAIL jrenslin 2020-11-11 17:25:41 +01:00
  • 6a6f71cf10 Add class MD_JAIL for forcing coders to set time and memory limits jrenslin 2020-11-11 17:20:56 +01:00
  • 8e3d97aa7f Move array_diff / array_values into different lines in MD_STD::scandir jrenslin 2020-11-09 14:17:54 +01:00
  • aa67de1e54 Add class MD_STD_SEC for basic security operations jrenslin 2020-11-08 19:34:57 +01:00
  • 50d3a20b01 Add type-safe drop-in replacement for mime_content_type() jrenslin 2020-11-08 18:54:40 +01:00
  • cb8c786284 Add check to ensure finfo_open works in ensure_file function jrenslin 2020-11-08 13:06:05 +01:00
  • 306efa3769 Add .gitattributes, git template jrenslin 2020-11-08 00:13:01 +01:00
  • 1c86051997 Add a function to ensure a file exists, optionally checking the mime type jrenslin 2020-11-08 00:12:02 +01:00
  • 2f68acdfc1 Make error messages for disallowed values more explicit jrenslin 2020-10-24 12:46:18 +02:00
  • 43bc39d425 Add function createTextSnippet() for shortening text to an expected length jrenslin 2020-10-23 16:13:02 +02:00
  • 711bd49048 Add function minizeHTMLString() jrenslin 2020-10-21 21:16:18 +02:00
  • 087b4a128e Add validation function for ISBN jrenslin 2020-09-30 00:58:58 +02:00
  • 0bfd6c3765 Add removal of duplicate spaces in input strings in MD_STD_IN jrenslin 2020-09-09 00:29:13 +02:00
  • 49ab75afe8 Add new function MD_STD_IN::sanitize_float jrenslin 2020-09-05 00:19:32 +02:00
  • 27b70a88c9 Use firefox for user agent in MD_STD::runCurl() jrenslin 2020-09-04 18:09:56 +02:00
  • b16a6762e4 Improve sanitizers for mails, urls jrenslin 2020-09-04 01:37:49 +02:00
  • f478728ab9 Improve sanitizing functions for mail and url jrenslin 2020-09-04 01:19:00 +02:00
  • 55db406401 Add wrappers for sanitizing URLs and mail addresses jrenslin 2020-09-04 00:46:45 +02:00
  • 6fe367ead7 Add final keyword to both classes jrenslin 2020-08-29 17:22:16 +02:00
  • 7d4a740f8f Use strict in_array() calls jrenslin 2020-08-27 17:16:48 +02:00
  • b39f26a3f7 Specify global namespace for more calls to build-in functions jrenslin 2020-08-22 23:57:37 +02:00
  • 25b3138a26 Add type-safe wrapper around MD_STD jrenslin 2020-08-22 17:00:21 +02:00
  • bac86627e2 Correct check against empty value in MD_STD_IN jrenslin 2020-08-22 12:13:08 +02:00
  • 566590135b Add function sanitize_id_or_zero for validating and sanitizing input integers that may hold an ID or a 0 jrenslin 2020-08-21 13:58:24 +02:00
  • bdee1e9aee Add wrapper around openssl_random_pseudo_bytes() jrenslin 2020-08-20 14:56:36 +02:00
  • 7b1dc582ed Use global namespace for generic call to \strtotime in MD_STD::strtotime jrenslin 2020-08-20 14:13:49 +02:00
  • d4b2986809 Fix over-sanitization for texts in MD_STD_IN jrenslin 2020-08-20 11:08:27 +02:00
  • 0fece80ed0 Add functionality to restrict allowed values taken from get via MD_STD_IN jrenslin 2020-08-19 15:32:15 +02:00
  • 17d1b6e88b Add class MD_STD_IN for input parsing and sanitization jrenslin 2020-08-19 14:55:38 +02:00
  • b8d8be54b9 Use integer for first param of human_filesize jrenslin 2020-08-11 08:10:23 +02:00
  • 08c9582210 Add lang_getfrombrowser and human_filesize jrenslin 2020-08-10 19:55:40 +02:00
  • a09eba6b84 Add type-safe wrapper around strtotime, removing ability for second param. jrenslin 2020-08-10 16:59:06 +02:00
  • 523cdaa7f4 Add type-safe wrapper around preg_replace for replacing in strings jrenslin 2020-08-09 00:59:41 +02:00
  • 00fcc997ce Exclude .git in MD_STD::scandir jrenslin 2020-08-07 18:32:44 +02:00
  • 8513458904 Add type-safe wrapper around json_encode jrenslin 2020-08-05 17:02:03 +02:00
  • c73d279ff0 Add wrapper around running curl (runCurl) jrenslin 2020-08-05 16:36:02 +02:00
  • 790e332502 Add type-safe wrapper around MD_STD jrenslin 2020-08-05 15:31:29 +02:00
  • 079786e42d Add type-safe wrapper around realpath jrenslin 2020-08-05 14:01:26 +02:00
  • f44fd251e1 Add functions startsWithAny, startsWith jrenslin 2020-08-05 09:06:28 +02:00
  • 1c68b4fa98 Fix wrong filename jrenslin 2020-07-26 15:13:03 +02:00
  • 481233efad Initial jrenslin 2020-07-26 14:52:41 +02:00