Commit Graph
7 Commits
Author SHA1 Message Date
Belle Aerni 50043e6211 Run Rector against our tests (#1761)
* Update rector config to include tests

* Run Rector against the tests

* Delete test-results

* Update .gitignore

* Correctly set the PHP min to 8.1, split the configs

* Corrected PHPDoc

* Deleted tests we can't really get to pass

PHPunit is hard-coded to fail when a class has a return type of `never`, which is the correct return type of our redirect function (and rightfully so).

No way to disable the exception as far as we can tell
2023-11-11 18:41:09 +00:00
Adam Daley 230b10f6ea Replace direct config references with constants (#1768)
* Fix PATH_DATA constant to use config

Update `PATH_DATA` constant to use the `path_data` config option.

* Replace direct config references with constants

Replace direct references to `config.php` file and specific config options in favour of global constants, where available.

* Drop BB prefix on global constants

Rename global constants to drop `BB_` prefix, where appropriate.
2023-11-06 07:55:23 +00:00
Jaap MarcusandBelle Aerni 2ddb7438ee Limit "LIMIT" to numbers only + Disable upload theme (#1392)
* Prevent non numeric values being used in limits

Potential abuse for Sql injection
Only allow integers to be used


Adjust exception

* Disable upload assets via Theme pages

File upload was removed in an earlier PR

* Make sure the test run fine

* Fix the tests

* Use limit instead of per_page

* And another fix

---------

Co-authored-by: Belle Aerni <belleaerni@gmail.com>
2023-06-30 22:51:50 +02:00
Belle Aerni ee676ca33a Update file references 2022-11-28 17:22:50 +03:00
evrifaessa db6a1946ce Updated tests. 2022-09-24 20:04:39 +03:00
samapraku 8a1718c606 Upgrade tests to PHPUnit 9 2020-08-18 21:12:03 +02:00
fordnox 5af4cc20d9 Initial release 2014-11-03 09:00:47 +02:00