Commit Graph
47 Commits
Author SHA1 Message Date
Jaap Marcus 7e8ff7700a Fix Installer when behind a reverse proxy (#1977)
Make sure set:
 proxy_set_header X-Forwarded-Host $host;
 proxy_set_header X-Forwarded-Proto https;

When creating then nginx config
2023-12-15 23:27:30 +00:00
Belle Aerni a3b6180abf Fix the issue John noticed (#1870)
* Fix the issue John noticed

* QoL: Don't delete it when debug mode is enabled
2023-11-25 04:01:08 +00: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 6006bfa264 Resolve events being duplicated in Sentry (#1844)
* Resolve events being duplicated in Sentry

* Fixed a typo

* Aaaand restored the placeholder

* Also adjust the API code
2023-11-17 09:00:05 +02: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
FOSSBilling Bot 7717e185aa Apply PHP Code Styling & Quality Changes (#1772) 2023-11-01 08:36:29 +01: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
Belle Aerni 28e2d824e1 Prevent errors over some CLI setups (#1729) 2023-10-17 13:26:37 -07:00
RonandBelle Aerni 75fb9cbdcf Developer Workflow Supporting Code (#1692)
* #1583 initial workflow update using debug reference in config for install dir bypass

* #1583 add missed files

* #1583 improve config generation

* #1583 clean up docblock (issue feedback)

* fix https detection, corrected pull from upstream

* #1583 improve docker build config

* #1583 remove docker configs from repo, they have been moved to dev workflow documentation

* Two very minor changes

* Other minor changes

---------

Co-authored-by: Belle Aerni <belleaerni@gmail.com>
2023-10-05 09:47:57 +02:00
Belle Aerni 8c7729ccd3 Miscellaneous autoloader improvements (#1676)
* Miscellaneous autoloader improvements

* Spelling

* Fixed PHPDocs
2023-10-04 07:40:19 +03:00
FOSSBilling BotandFOSSBilling Bot f37753d4a7 Apply PHP Code Styling & Quality Changes (#1638)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2023-09-26 17:10:30 -07:00
Belle Aerni 8c047bc0da Fix to allow analysis to run against the installer (#1633) 2023-09-25 22:02:57 +03:00
YağızhanandBelle Aerni dbcf9a3ad4 Rewritten bin/prepare & +FOSSBilling_Environment (#1622)
* Rewritten bin/prepare & +FOSSBilling_Environment

* -redundancy

* - unnecessary bits

* nothing much

* Fix inverted logic, use new function in missed location

---------

Co-authored-by: Belle Aerni <belleaerni@gmail.com>
2023-09-22 18:19:02 -07:00
Belle Aerni 0318eb1287 Tweak the HTTPS check and secure cookie flag behavior (#1600) 2023-09-14 23:44:16 +03: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 5eb516d4eb Prevent exceptions from being interpreted as HTML (#1394) 2023-07-01 14:58:13 +02:00
Belle Aerni 25a0090c5d Bump AntLoader to v2.0.0 (#1280) 2023-05-30 12:26:24 +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
Belle Aerni dded03b41d Replace custom autoloader with AntLoader (#1215)
* Replace custom autoloader with AntLoader

* Update install.php

* Bump antcms/antloader to v1.0.1
2023-05-05 14:17:56 -07:00
Adam Daley e54569d2cd Introduce namespaces and strict typing for FOSSBilling library classes (#1206) 2023-05-04 01:02:06 +01:00
Belle Aerni d9e69d4146 Implement a custom autoloader (#1194)
* Implement a custom autoloader

* Remove unreachable line

* Spelling

* I missed that

* Just use the latest version of PHPStan

* Also setup the autoloader in the installer

* Implemented classmap capabilities

* Remove debug line, add PHPDocs

* Typo 7 removing dead code

* Fix the installer after the most recent commit

* Remove outdated installation steps

And link to the website instead

* Excuse me. Formatting please?
2023-05-01 13:19:55 -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
Belle AerniandAdam Daley ed404202a6 Remove broken and poorly implemented feature (#1190)
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2023-04-29 12:58:29 -07:00
Belle Aerni 273dc3bf65 Fix load.php and minor error handler issues (#1188)
* Fix load.php and minor error handler issues

* Re-enable the installer check

* Final few fixes
2023-04-29 20:56:14 +01:00
Belle Aerni 47dffabac2 Replace the error page and start work on #195 (#1006)
* Redesigned error page + specialized error messages

* Improvements / fixes to strings
2023-04-28 14:20:14 -07:00
Adam Daley 23858386e9 Clean up loader (#1177) 2023-04-28 07:29:30 +01: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
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 5eb9452dc6 Fix unknown encore_entry_link_tags function (#1048) 2023-04-04 01:18:19 -07:00
Belle Aerni 94ada496f3 Fix reference to old config key (#1004) 2023-03-28 08:31:54 +03:00
Belle Aerni 5bf8bcd877 Improve update script (#987)
* Improve update script

* Remove empty else statement
2023-03-24 00:13:05 -07:00
Adam 91a892c5be Remove remaining Google Fonts (#840)
* Remove remaining Google Fonts

Replaces remaining Google fonts with web safe fonts (resolves #249).

* Restore error page background image

Embed the background inline for the error page.
2023-02-18 15:52:34 -08:00
Anyx 0edee483a8 Update docs URL & enforce FOSSBilling naming
Update the documentation URL and replace instances of "fossbilling" with "FOSSBilling" where applicable.
2023-01-21 21:45:38 +02:00
Anyx 075f6179a9 🐛 Fix slashes mixup (#670) (#671)
Fix slashes mixup by replacing the hardcoded forward slash with the DIRECTORY_SEPARATOR PHP constant.
2023-01-07 18:03:47 +01:00
Belle Aerni 44c7f6f405 Create an alias for bb-ipn (#605)
* Create an alias for bb-ipn

* Slight tweak

* Updated docker config
2022-12-19 12:05:30 -08:00
Belle Aerni 70834be9e1 Created new security mode option (#565)
* Created new security mode option

* Add some more configurable options

* Cleanly handle security config not being defined

* Don't try to redirect to HTTPs for cli

* Update di.php
2022-12-11 02:54:37 -08:00
Belle Aerni 5519497df5 Clean up old references 2022-12-03 15:22:28 -08:00
Belle Aerni a13b49d0d5 Automatically rename the config from the old name 2022-11-28 16:20:21 -08:00
Belle Aerni 7991512aa7 Improve the message 2022-11-28 17:22:51 +03:00
Belle Aerni 417a048885 bb-config.php --> config.php 2022-11-28 17:22:51 +03:00
Belle Aerni debb3652d4 Display info if old file names are found 2022-11-28 17:22:51 +03:00
Belle Aerni 1fbb6d8ff1 Add alias for BB_PATH 2022-11-28 17:22:51 +03:00
Belle Aerni edb163f442 BB_PATH --> PATH 2022-11-28 17:22:51 +03:00
Belle Aerni ee676ca33a Update file references 2022-11-28 17:22:50 +03:00
Belle Aerni edd6f72634 Drop the "BB" prefix 2022-11-28 17:22:50 +03:00