Commit Graph
30 Commits
Author SHA1 Message Date
Belle Aerni be36d68f61 Restructure the redirect after login functionality (#1897)
* Restructure the login after redirect functionality

* Initialize the session in the start of the app

* Fix the test

* That 100% needs to come after the fallback patcher
2023-11-29 08:45:55 +02:00
FOSSBilling BotandFOSSBilling Bot ee1c0f33fa Apply PHP Code Styling & Quality Changes (#1856)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2023-11-21 11:27:18 -08:00
Belle Aerni 4b53bff9e6 Improved backup patching (#1849) 2023-11-20 07:51:59 +02:00
Belle AerniandYağızhan 865b0b6159 Implemented PHP DebugBar (#1825)
* Brought in the debugbar extension

Co-Authored-By: Yağızhan <hi@yagiz.dev>

* Completely restructured

Redid the previous work to allow us to pass around a single instance of the debug bar, allowing us to leverage more types of data collection.

* Added some more time measurements

* Enabled HTML var dumper, added config collector

* Fix

---------

Co-authored-by: Yağızhan <hi@yagiz.dev>
2023-11-16 23:21:14 +00:00
FOSSBilling BotandFOSSBilling Bot 9f3fb51377 Apply PHP Code Styling & Quality Changes (#1834)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2023-11-14 04:43:14 -08:00
Yağızhan 3c11f9a97a Clear the cache after the patches are done (#1818) 2023-11-12 11:02:49 +01:00
Belle Aerni 104553bf7f Error reporting bug fixes (#1785)
* Error reporting bug fixes

* This is honestly a better way to do this
2023-11-08 07:08:58 +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
Belle Aerni 602b537996 Opt-in error reporting via Sentry.io (#1732)
* Began implementing Sentry.io support

* Added to the installer

* Added the ID to the bug report template and UI

* Hook it into our error handler, added the ability to filter by error code

* Attempting to add the DSN via GH actions

* Spelling and making PHPstan happy

* Skip exceptions for various incomplete configurations

Also brings in some of the category suggestions made by @Anuril in #195

* Update tests to account for changes

* Added & renamed exception classes

* Fix tests

* Change a bunch of items to be InformationExceptions

* Use a lighter HTTP client, fixed API error reporting

* I guess that's not needed now?

Arighty then

* Improvements, additional info added

* Update SentryHelper.php

* Improved error logging, added instance ID to error page

Also made it so that errors are correctly sent to Sentry rather than exclusively exceptions

* Make the tests happy

* Added the link, improved wording

Also removed the "performance" part of the reporting as it needs to be added to the front-end and I'm not currently implementing that

* Began implementing UI alerts and info

* Added the ability to toggle, fixed tests, use path constants

* Added some useful info & links to the page

* These should be InformationException

* Fix the automated Sentry DSN entry

* Fix the install number text

* Minor cleanup, converted more to InformationException

* Replaced some direct config references with constants

We have the BB_DEBUG constant to indicate if we have debug mode enabled or not, so we shouldn't be directly referencing it in the config file unless we actually need to do so.

Using the constant means there's less locations to update the reference if the config structure is changed

* Bugfix

* Consistency & fixed a PHPDoc

* Corrections

* We actually do want exceptions thrown here

* Change how we get the instance ID

* Stability improvements

Having support for translatable error pages was proving to be problematic, so I had to remove it.

I also had to update the exception class to handle cases where the trans function wasn't setup yet (needed for the /run-patcher page if an error occurs)

* Missed this change on git

* Also fix the variable names...

* Re-added new deps after rebase

* This should also accept "Error" types

* Added more info to the bug report and removed a dug line

* This wasn't supposed to get renamed

* Updated some missed references to Box_Exception
2023-10-28 18:40:39 -07:00
Yağızhanandfossbilling-bot fd872ac941 Implement PHP-CS-Fixer as an automated workflow (#1240)
* Implement PHP-CS-Fixer as an automated workflow

* Apply PHP-CS-Fixer changes

---------

Co-authored-by: fossbilling-bot <121974958+fossbilling-bot@users.noreply.github.com>
2023-07-30 06:49:11 -07:00
Belle Aerni c718051497 Provide a fallback method to perform patches (#1393)
* Provide a fallback method to perform patches

* I am not very good at spelling, don't tell anyone
2023-07-01 15:51:47 +03:00
Yağızhan d909d77f7e -Unnecessary whitespace in the class headers (#1219) 2023-05-07 13:24:29 -07:00
Yağızhan 412e4a9fbd Standardized the class headers (#1212) 2023-05-06 13:06:17 +01:00
Yağızhan a3369124ea Look for PATH_INFO (#1197) 2023-05-01 06:22:04 -07:00
Belle AerniandAdam Daley e3d6bc9ad9 Introduce a cspell workflow (#1192)
* Introduce a cspell workflow

* Update cspell.yml

* Update cspell.yml

* Why is it seemingly ignoring the config?

* Waiit a min

* Fixed a bunch of spelling mistakes

* And set it back to incremental mode

* That is actually supposed to be spelled wrong..

Because BoxBilling :)

* Capitalization

* I swear I fixed this as well

* Update cspell.json

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2023-04-30 00:05:25 -07:00
Adam Daley 52bfaca190 Fix HTTP response error code bug (#1136)
Update index to fix bug in error code handling introduced in #1122 by restoring default $_GET value for errcode to null.
2023-04-21 20:26:20 -07:00
Adam Daley ca67aeb44f Refactor request handling to use native functionality (#1122)
Refactor request handling to remove custom library/Box/Request class where possible and instead use native PHP functionality.
2023-04-21 15:07:59 +02:00
Belle Aerni 0a5fb92b05 Various improvements to translatable strings (#1108)
* Various improvements to translatable strings

* Tests
2023-04-15 03:51:18 -07:00
Adam Daley b08fc53d72 Update rewrite rules, improve error handling, and some related cleanup (#1075)
* Rename htaccess to be applied automatically

Rename the htaccess file, improve handling when .htaccess is missing, and remove from .gitignore so that rules are automatically applied on supported web servers.

* Clean up .gitignore file

* Update .htaccess to improve security

Update .htaccess file to improve general security, handle missing mod_rewrite, and to simplify the required rules.

* Improve HTTP and generic error handling

Improve handling of HTTP errors, and make the error handling code more generic to permit catching more errors.

* Remove outdated example web server config files

Remove the outdated and unmaintained example web server configuration files in favour of FOSSBilling/config-generator.

* Remove support for non-search engine friendly URLs

Remove support for non-search engine friendly URLs as these are depreciated.

* Revert "Remove support for non-search engine friendly URLs"

This reverts commit 724b1eb274.

* Update config migration backup handling
2023-04-06 21:59:25 +02:00
Belle Aerni 5516a81b9d Fix a few warnings with PHP 8.1 (#1003)
As the tin says. Just fixes a couple instances where warnings would be thrown because `null` was being passed
2023-03-28 00:05:26 +01:00
Belle Aerni ee676ca33a Update file references 2022-11-28 17:22:50 +03:00
Benjamin Aerni 42d197568e Apply PHP CS Fixer 2022-11-02 12:00:10 -06:00
tautvydaskarvelis 86d6234208 Improved code style by adding missing return types, replacing funcs with more reliable ones and etc 2022-10-02 17:52:30 +03:00
S4 Hosting b5427fdd46 Copyright and license notices changed to correctly comply with Apache 2.0 2022-05-31 14:51:44 +03:00
andpavlenko f4c4f6bac7 Mirgate to PSR12 and other small fixes 2022-04-01 09:32:55 +00:00
Benjamin Aerni 6cc85ddbbc Fix copyright URL (#1018)
* Update copyright URL to https://www.boxbilling.org

* I don't know the exact copyright of this file, but we definitely don't own it
2021-08-30 19:20:13 -07:00
Vaidas Lungis 36172e157b change di['translate']('admin') to di['translate']() 2015-02-26 15:33:15 +02:00
Vaidas Lungis ea63214808 update admin_prefix check
check only first characters of _url param value.

issues were when admin_prefix was "admin"
2015-02-13 16:17:12 +02:00
Vaidas Lungis a57d9f7092 reworked translation implementation
translation object added into DI
issue #207
2015-01-15 18:26:30 +02:00
fordnox 5af4cc20d9 Initial release 2014-11-03 09:00:47 +02:00