You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, if you use e107 object without class2 file, there are still handlers that use classes from class2.php (without control if they exist) so you need to add them manually. But there is already a file for this... I don't see the reason why they need to be in class2 file if they are really core functions.
From what I understand class2.php is the security of your website: It performs checks on all traffic to the rest of e107 in order to prevent bad actors from causing trouble. You really should not use any php scripts without loading class2.php first, and since it is loaded the functions in that file are available for use anywhere further down the load chain.
@Vodhin look at thumb.php file. You don't need class2.php to use e107 handlers. e107 class is required.
Security is done in handlers too. Class2.php is needed only for the theme and front end. class2.php just combine calling those handlers.
I don't ask for security changes. It is more semantic. If there is file core functions why those functions are in class2.php if class2.php or e107 class still loads this file? That file is a mandatory file.
Motivation
Possibility to use e107::getInstance()->initCore() directly without class2.php (see example in thumb.php)
But there are some functions that are needed in handlers and they are now in class2.php:
For now:
function check_email($email)
function check_class($var, $userclass = null, $uid = 0)
function cookie($name, $value, $expire = 0, $path = e_HTTP, $domain = '', $secure = 0)
Proposed Solution
Could be those functions moved to core_functions.php file?
Thanks
Alternatives
only workaround like separate file with those functions
Additional Context
No response
The text was updated successfully, but these errors were encountered: