Commit Graph

56 Commits

Author SHA1 Message Date
FusionPBX
1a221e0310 Add security headers for non-CLI execution
Add security headers conditionally for non-CLI requests
2025-10-15 21:43:14 -06:00
FusionPBX
dda18481ec Refactor PHP code (#7574)
* Use settings-get method
- get default, domain and user settings
- Replace _SESSION

* Simplify get domain paging

* Change isset using empty

* Fix token name and hash

* Add new default settings category: contact, name: default_sort_column, and default_sort_order

* Update app_config.php

* Update footer.php

* Fix require.php and core/dashboard/index.php (#7563)

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Update destinations.php

* Update permission.php

* Update require.php

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
Co-authored-by: FusionPBX <mark@fusionpbx.com>

* Update header.php

* Use settings get classes (#7567)

* access_control

* azure

* azure

* basic_operator_panel

* bridges

* call_block

* call_broadcast

* call_center

* call_flows

* call_forward

* call_recordings

* do_not_disturb

* feature_event_notify

* follow_me

* remove unused object properties

* fix esl command

* fix esl command

* conference_centers

* conference_centers - remove whitespace

* conference_controls

* conference_profiles

* conference_profiles

* Delete core/websockets/resources/classes/socket_exception.php.original~

* Delete core/websockets/resources/classes/websocket_server.php.original~

* conferences

* destinations

* device

* dialplan

* email_queue

* event_guard

* extension_settings

* extension

* fax

* fax_queue

* fifo

* gateways

* ivr_menu

* modules

* switch_music_on_hold

* number_translations

* phrases

* pin_numbers

* provision

* switch_recordings

* registrations

* ring_groups

* sip_profiles

* sofia_global_settings

* streams

* presence

* switch_files

* time_conditions

* vars

* voicemail_greetings

* voicemail

* ringbacks

* contacts

* xml_cdr

* authentication

* dashboard

* default_settings

* domain_settings

* email_templates

* permission

* user_logs

* user_settings

* users

* button

* cache

* captcha

* remove cli_option

* remove directory.php for switch_directory class

* email

* file

* groups

* event_socket use config object

* Use intval to give an integer port

* switch_settings

* tones

* fix object used before initialization

* menu

* fix copy paste error for switch_files.php

* always include require.php for framework files

* Fix missing properties

* set the action

* Use the $database object

* Add missing class properties

* Fix the domain_name

* Use public scope for domain_uuid and domain_name

* Add missing parameters

* Correct the user_uuid parameter

* Add json_validate and use it in the dashboard
update indentation on functions.php

* Intialize the active_registrations variable

* Define the $parameters

* Set a default value for user_setting_enabled

* Add condition domain_uuid not empty

* Add not empty condition for domain_uuid

* Declare the global variables

* Update how the defaults are set use ??

* Use ?? to set the default values

* Update call_center_queue_edit.php

* Prevent an error

* Add domain_name property

* Fix the null coalescing operator

* Removed domain_uuid from the URL

* Change condition to check sip_profile_domain_name

* Refactor domain_uuid declaration and comments

Removed redundant domain_uuid declaration and updated comments.

* Account for an empty value

* Refactor constructor to use settings array

Updated constructor to accept settings array for domain UUID and database initialization.

* Refactor xml_cdr.php to improve variable organization

Removed duplicate domain_uuid declaration and reorganized private variables for better structure.

* Enhance transcription button logic and icon display

Updated transcription button visibility conditions and improved application icon handling in the call flow summary.

* Refactor settings initialization in domains.php

Updated settings initialization to include domain_uuid and user_uuid.

* Modify domain change condition in require.php

Updated condition to check if 'domain_change' is not empty before proceeding.

* Set default_setting_enabled to true by default

* Enhance domain UUID check in access controls

* Enhance domain UUID check in settings list

* Refactor category display logic in vars.php

* Simplify list row URL generation

Removed domain UUID check from list row URL construction.

* Refactor module category display logic

* Fix SQL query by removing parameters variable

* Initialize result_count variable for call recordings

* Refactor leg variable usage in xml_cdr_details.php

* Update conference_room_edit.php

* Change GET to REQUEST for order and search variables

* Set timezone and SQL time format in recordings.php

Added timezone and SQL time format settings.

* Set default for ring group greeting

* Improve domain UUID check in stream listing

* Handle null voicemail_option_param safely

* Add file existence check for greeting files

Check if greeting file exists before getting size and date.

* Improve domain UUID check in email templates

* Update FIFO strategy dropdown and description text

* Add multilingual agent descriptions

Added multilingual descriptions for agents in the app_languages.php file.

* Add music on hold descriptions

* Add the chime list description

Updated copyright year from 2024 to 2025.

* Fix domain UUID check and handle email subject decoding

* Add null coalescing for $value in email_test.php

Ensure $value is not null by providing a default empty string.

* Handle undefined dialplan_uuid in input field

* Add translations for 'Status' label in multiple languages

* Fix typo in config instance check

---------

Co-authored-by: frytimo <tim@fusionpbx.com>
2025-10-15 21:24:59 -06:00
Alex
80a84c69f1 Security - Add headers for X-Content-Type-Options and Referrer-Policy (#7571) 2025-10-14 13:43:06 -06:00
Alex
8c82c7077b Security - Add headers for X-Frame-Options and Content-Security-Policy (#7564) 2025-10-13 13:03:52 -06:00
Alex
e53199fd28 Add HttpOnly, Secure, and Samesite session settings to config.conf (#7547)
* Add HttpOnly, Secure, and Samesite session settings to config.conf

* Update upgrade_menu.php

* Update upgrade.php

* Update upgrade.php

* Update install.php
2025-10-03 16:06:47 -06:00
Alex
60a0a0ee2a Security - Secure session cookies by setting HttpOnly, Secure, and SameSite attributes (#7529) 2025-09-23 16:00:01 -06:00
FusionPBX
68188df936 session_start
Start a session if not using the command line and no_session is empty.
2025-08-26 14:11:29 -06:00
frytimo
99b3100ee9 fix typo in require.php file (#7319) 2025-03-14 22:55:00 -06:00
frytimo
da6471df5f Optimize require.php (#7286)
Load the auto_loader first
Use config object to find config.conf file and declare global
Use database object and declare global
Use settings object and declare global
2025-03-11 14:37:31 -06:00
Alex
e416e74c30 Add domain change to require.php (#7263) 2025-02-20 11:25:36 -07:00
FusionPBX
106fc33459 Remove the pdo.php include
The pdo.php file was replaced by the database class
2025-01-08 12:14:38 -07:00
frytimo
949d407604 change include to require once (#7157)
Co-authored-by: Tim Fry <tim@fusionpbx.com>
2024-10-09 09:19:08 -06:00
jrmcclean
12a862217f Update require.php (#6860)
Added an option to check Windows ProgramData
2024-07-23 08:14:55 -06:00
FusionPBX
375c7d228b Update require.php 2024-04-20 22:59:45 -06:00
frytimo
77e4bb9865 Reorder project path and project root defines (#6787)
* reorder the project_root and project_path define so isset is called
before the config key project.root is used

* ensure project path begins with a '/'

* rewrite for empty string in project_path

* Update require.php
2023-10-16 21:54:56 -06:00
FusionPBX
2c5724c6ed Add new class methods and use them 2023-09-11 01:45:19 -06:00
FusionPBX
2ceb4453c5 If the config_file doesn't exist then redirect to the install.php 2023-08-15 16:19:22 -06:00
FusionPBX
9f004f696e Use trim on the file contents and use file_exists 2023-08-14 21:35:31 -06:00
FusionPBX
0fb78ee94e Enable setting a custom config_file path 2023-08-14 21:18:10 -06:00
FusionPBX
90cbc08551 Replace GLOB_BRACE as its not compatible with all systems 2023-08-14 12:04:00 -06:00
markjcrane
1452bde1ac Update the database class to find the require.php 2023-06-17 22:29:15 -06:00
markjcrane
38150d25aa Use require.php 2023-06-17 21:50:29 -06:00
fusionate
7d37d7a521 Require - Updates for PHP 8.1 2023-05-16 18:39:41 +00:00
FusionPBX
fd0615587e Update require.php 2023-05-08 19:02:58 -06:00
FusionPBX
0413b998e8 Ensure PROJECT_ROOT is defined 2023-05-08 18:50:32 -06:00
FusionPBX
26e3a0881d Error reporting for user hide deprecated 2023-05-08 15:07:59 -06:00
FusionPBX
b4ccdd244b [bug] error reporting options user, dev, all (#6616)
An enhancement that adds simple options to show what errors to show in the web interface. This also fixes a bug that causes an error in PHP8.
2023-04-26 11:19:45 -06:00
FusionPBX
dc3b95da36 Use tabs for indentation 2023-01-17 12:07:35 -07:00
FusionPBX
eacff4c797 Code is causing a larger issue removed for more testing. 2022-10-14 12:38:01 -06:00
FusionPBX
3b8d3b70ea Include additional functions
Moved here from resources/functions.php
2022-10-14 10:07:14 -06:00
FusionPBX
3e8ea2015f Use the error reporting defined in config.conf 2022-10-13 16:23:20 -06:00
FusionPBX
227aa97adc Use class_exists around auto_loader 2022-10-11 15:34:55 -06:00
FusionPBX
fe53483ed8 Update require.php 2022-10-10 16:59:57 -06:00
FusionPBX
1c81f9c8b2 Replace config.php with config.conf 2022-10-10 13:16:32 -06:00
FusionPBX
bfbfca96e3 Use the new PHP auto_loader.php file. 2021-11-26 13:13:04 -07:00
FusionPBX
1aaf1aa2fa Add the new cidr.php file. 2021-11-26 12:34:02 -07:00
FusionPBX
5f801d9501 Add priorities and debug information. 2021-08-11 17:10:18 -06:00
FusionPBX
f05d193bc9 Update require.php
Set the full path for file_exists.
2020-11-03 17:21:41 -07:00
Nate
49e2f1b41e Update resources/require.php - Don't require switch.php if not present (framework support). 2020-11-03 12:16:00 -07:00
Nate
0df02b95dd Template: Convert to Smarty syntax. 2020-03-17 20:31:29 -06:00
Mafoo
b1c5d870e0 BugFix - GUI install (#2779)
Fixes to remove some errors in the GUI installer
2017-08-02 10:45:35 -06:00
reliberate
6db45055c4 Fix path issue in require.php. 2016-05-05 14:18:59 -06:00
markjcrane
7bcb0037f4 Conditional includes if the config.php exists this fixes css.php for the install. 2016-05-05 13:22:08 -06:00
Harry G. Coin
8abe003a71 The goal is to increase confidence in fusionpbx, one step is to run by default with error_reporting (E_ALL ^ E_NOTICE);
So, please find in this set numerous small changes which eliminate numerous php warning messages.

Also, a small bug fix in an sql statistics routine, naming a count(*) field as count, so displaying correct detail.

If any of the proposed changes are omitted, the relevant page will experience php warnings.

There are no doubt fusionpbx pages I've yet to visit that still generate warnings, this set is nearly certainly not comprehensive.
2016-04-25 20:19:58 -05:00
Mark Crane
dd9ade256f Update release to fix big for systems where GLOB_BRACE is not available. 2015-05-13 04:37:36 +00:00
Nate Jones
fe8032b1c3 Misc: Removed use of GLOB_BRACE as doesn't work on some systems, use non-GLOB_BRACE method instead. Thanks [xming] and Risk64. Should resolve Issue 916, as well. 2015-05-12 18:11:05 +00:00
Nate Jones
283cda7aa1 Translate: Necessary resource mods. 2015-01-18 07:54:19 +00:00
Mark Crane
01f34c0210 Update the example code to set MOH. Add the auto_loader class only if it is not defined. 2014-12-24 06:36:09 +00:00
Mark Crane
bceaa58b78 predefine a variable to prevent a PHP notice. 2014-11-25 00:23:02 +00:00
Mark Crane
e9993f4c3e Update the dev branch version to 3.7 and get rid of GLOB_BRACE which is not defined in Solaris 2014-08-19 09:16:01 +00:00