1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-18 05:09:05 +01:00

4641 Commits

Author SHA1 Message Date
Nick Liu
ef34ef7ec8
Removed obsolete ALLOW_AUTO_FIELD_DEFS constant 2020-01-17 15:54:56 +01:00
Nick Liu
4321c1b944
Null coalescing for $_SERVER keys in session_handler.php
Resolves CLI-invoked E_NOTICE in:
* e_session::getValidateData()
* e_core_session::challenge()
2020-01-17 15:54:12 +01:00
Nick Liu
6fe4bf16be
Null coalescing for $_SERVER keys in online_class.php
Resolves CLI-invoked E_NOTICE in:
* e_online::goOnline()
2020-01-17 15:46:15 +01:00
Nick Liu
a49b532519
Stop stepping on E107_DBG_* constants in tests
\Helper\Unit::_beforeSuite() now sets E107_DEBUG_LEVEL so that
debug_handler.php sets the debug mode.

Also fixed E_NOTICE if E107_DEBUG_LEVEL is set beforehand
2020-01-17 15:42:57 +01:00
Nick Liu
bcba1e065f
Null coalescing for $_SERVER keys in iphandler_class.php
Resolves CLI-invoked E_NOTICE in:
* eIPHandler::__construct()
* eIPHandler::getCurrentIP()

Also resolves possible blank eIPHandler::$serverIP
2020-01-17 15:11:45 +01:00
Nick Liu
c232613e44
Fix mkdir() failure in e107::_init() if parent not exists 2020-01-17 15:10:18 +01:00
Nick Liu
be36462fe6
Null coalescing for $_SERVER keys in e107_class.php
Removes CLI-invoked E_NOTICE in:
* e107::prepare_request()
* e107::set_constants()
* e107::set_urls()
2020-01-17 15:04:29 +01:00
Nick Liu
34047a2db3
Prevent HTML code injection in e107::url()
Fixes: #4054

This is a better fix for #4054. HTML code injection can no longer occur in URLs generated by
e107::url() thanks to htmlspecialchars(). The previous implementation only addressed:

    & => &

Now, quotation marks and alligator brackets are also escaped, so:

    <a href=""></html>"></a>

is now rendered as:

    <a href="&quot;&gt;&lt;/html&gt;"></a>
2020-01-14 23:56:19 +01:00
Nick Liu
82b2da4c36
Better documentation for e107::url()
Clarifies that the output format of e107::url() is like htmlspecialchars()
2020-01-14 23:56:19 +01:00
Cameron
ac47858941 PHP Notice Fix. 2020-01-14 14:44:29 -08:00
Nick Liu
4893ea7c67
Fix bad reformatting of e107::url() 2020-01-13 01:14:22 +01:00
Nick Liu
e62422d63a
Old HTML ampersand strict compatibility
- FIX: e107::url() now puts "&amp;" in the query string instead of "&" for compliance with the older,
       looser definition of ambiguous ampersands in the HTML specification.
       Fixes: #4054
- FIX: Typo in comment
- FIX: Clear the core/e107/addons/e_url registry (cache) because if a plugin is installed after that
       cache is initialized, the cache is not updated anymore. The plugin's e_url is therefore not
       loaded, so SEF URLs won't be generated for that plugin until the cache is regenerated.
- NEW: Test for #4054
- FIX: e_pluginTest::testGetFields() expects the initial condition of the "forum" plugin to be
       uninstalled.
2020-01-13 00:54:50 +01:00
Nick Liu
d13fcd44c7
De-indented e107::url() with guard clause
Less cognitive complexity now that the e_url.php check is a guard clause
2020-01-13 00:54:49 +01:00
Cameron
8270c5cf42 Remove tests folder when doing a core github pull, unless developer mode is active. 2019-12-29 12:45:35 -08:00
Cameron
ec2061e880
Merge pull request #3995 from Jimmi08/patch-5
Fixes #3983 blank page because missing method name
2019-12-28 12:03:09 -08:00
Cameron
598522e603
Merge pull request #4038 from e107inc/test-harness
Automated Testing for e107
2019-12-28 10:45:11 -08:00
Nick Liu
60aa3f34d4
Refactored e_db_pdo::copyRow() for Codeception
Fixes: "The method copyRow() has an NPath complexity of 252. The configured NPath complexity threshold is 200."
2019-12-28 10:57:51 +01:00
Nick Liu
fabb0c2757
e_db_pdo::copyRow() - Greatly decrease collision chance
Increased possible random strings for unique fields in e_db_pdo::copyRow() from 1000 to 59^11 (UserHandler::generateRandomString() "alphanumeric" should have 59 characters to choose from)

If a collision still happens, e_db_pdo::copyRow() retries up to 3 times for a successful copy.

Fixes: #3678
2019-12-27 21:54:11 +01:00
Nick Liu
3b4240bbae
Quality control for e_file::unzipGithubArchive()
- MOD: PHPDoc for e_file::unzipGithubArchive()
- NEW: e_file::unzipGithubArchive(): Added exclusions for files that don't exist in production
- NEW: e_file::unzipGithubArchive(): Accept a destination path argument for a custom extraction location
- NEW: Restored unimplemented skipped list in e_file::unzipGithubArchive()
- FIX: e_file::unzipGithubArchive(): Extraction fails if parent directory of file doesn't exist
- MOD: Type hint for Base::$deployer
- NEW: Basic test for e_file::unzipGithubArchive()
2019-12-27 11:33:21 -06:00
Nick Liu
ed58d40adb
Merge branch 'master' into test-harness
To verify that tests still pass with the latest changes
2019-12-25 16:30:45 -06:00
Nick Liu
b3cf8df03c
Fixed inconsistent output in PHP < 7.3 in e_parser::cleanHtml()
- FIX: Workaround for https://bugs.php.net/bug.php?id=76285 present in PHP versions below 7.3 that maintains compatibility for PHP >= 7.3
2019-12-25 12:21:13 -08:00
Nick Liu
8c7d32c523
Fixed MPREFIX regression caused by a4c6fd8b
Caused by: a4c6fd8b5bf268ae7032acb14f4476a192a48b62

- FIX: MySQL table prefix is lost due to cyclic e_db_pdo::database() call that loses the prefix and reverts back to the default prefix, MPREFIX or "e107_".
2019-12-23 21:11:59 +01:00
Nick Liu
a93165efa5
Implemented missing e_db_mysql::resetTableList() method
e_db::resetTableList() is now an interface method (undocumented)
2019-12-23 17:12:47 +01:00
Nick Liu
a4ad81dd4c
Resolved e_db_mysql::db_Query() logging inconsistency
Logging change made in f34eeaf369678ddafe2842b391e3b1ec534aa324 for e_db_pdo was not applied to e_db_mysql

This commit makes the behaviors consistent between the two implementations of e_db.
2019-12-23 17:08:01 +01:00
Nick Liu
9677db1c1c
Removed bad e_LEGACY_MODE implementation
e_LEGACY_MODE caused the query results from e_db_pdo and e_db_mysql to return different styles (MYSQL_BOTH and MYSQL_ASSOC, respectively).

To resolve this inconsistency, e_LEGACY_MODE has been removed from the e107 core.
2019-12-23 16:50:33 +01:00
Nick Liu
71e7f8778c
Merged e_db_mysql and e_db_pdo tests into e_db_abstractTest
- FIX: e_db::copyTable() is now an interface
- FIX: e_db_mysql now implements e_db
- FIX: Implemented missing e_db_mysql::copyTable() public method
- FIX: Implemented missing e_db_mysql::setLanguage() method
- FIX: Implemented missing e_db_mysql::getLanguage() method
- FIX: Implemented missing e_db_mysql::dropTable() method
- MOD: Merged e_db_mysqlTest and e_db_pdoTest into e_db_abstractTest
2019-12-23 16:37:48 +01:00
Cameron
ef4f34d223 Fixes #4017 - "Bad File Detected" when uppercase extension used on image. 2019-12-10 11:35:08 -08:00
Cameron
3087826ee9 Fixes #4041 - SEF Generation confirmation 'cancel' option was being ignored. Also, confirmation will now only appear if the current sef is not empty. 2019-12-06 13:12:42 -08:00
Cameron
4bf21cbaa5 AdminUI: Fixes conflict between custom 'filter' dropdown and 'search' input. New method format added for custom search field processing independent of "Filter" processing. See handleListBanlistIpSearch() for an example. 2019-12-05 10:44:59 -08:00
Cameron
1ff3dd0f8d Fix for 'select' method - test validation. 2019-12-04 10:19:38 -08:00
Cameron
5cf54d07d2 Basic per-item search engine robots handling added to News and Pages. 2019-12-02 13:32:21 -08:00
Tijn Kuyper
26bc061e79
Notify - Only show debug info to admins or when developer mode is active 2019-11-06 16:28:09 +01:00
Cameron
281db68aa2 Provide raw search query to custom method.
Issue: #4009 Support banlist filtering using wildcards.
2019-11-05 10:27:21 -08:00
Cameron
7f07f019c3 Issue #4009 - refining banlist ip search 2019-11-05 09:20:48 -08:00
Cameron
762844037f Fixes #4009 . Enhanced admin-ui to support custom filter handlers on string searches (not just drop-drop filters as was already the case) 2019-11-05 08:54:16 -08:00
Tijn Kuyper
9dfe6728a8
#3131 - Get rid of autocomplete when we do not want it
Correct commit now.
2019-10-30 15:51:54 +01:00
Tijn Kuyper
1de3213d98
Revert "#3131 - Finally get rid of autocomplete when we don't want it"
This reverts commit 93d86dd99cbd27ea55b17ced42214edb56834e99.
2019-10-30 15:47:43 +01:00
Tijn Kuyper
93d86dd99c
#3131 - Finally get rid of autocomplete when we don't want it 2019-10-30 15:46:59 +01:00
Jimako
07bfc2d0bf
#3983 fix for blank page because missing method name 2019-10-29 18:14:23 +01:00
Tijn Kuyper
cd01137173
Notify clarify debug message 2019-10-29 11:12:21 +01:00
Tijn Kuyper
66c2014830
Fixes #3303 - Mailout - display message when no email address sources are selected 2019-10-24 14:33:23 +02:00
Tijn Kuyper
74a6cba8cd
Created user/e_search addon and upgraded to v2 specs 2019-10-24 11:56:26 +02:00
Tijn Kuyper
7a665cedba
Code clean up
globals, indentation, renaming old Db methods, etc.
2019-10-11 17:19:48 +02:00
Tijn Kuyper
2f6de4264f
Closes #3966 - Add tbox class to datepicker() input form 2019-10-06 14:30:42 +02:00
Tijn Kuyper
0922eaca21
#3680 - Tweak messages when comments are disabled or locked on news items 2019-10-02 14:57:25 +02:00
Cameron
609496ab4c Improved performance on getLayouts when using the new 'layouts' folder in the theme's directory.
Possible fix for missing class in footer_default.php
2019-09-03 05:58:04 -07:00
Cameron
2a1b4d75df Fix for installation issue. 2019-09-03 05:09:19 -07:00
Cameron
79e8f834d9 SEO 2019-08-30 19:07:32 -07:00
Cameron
f8733b7ea1 Remove BOOTSTRAP and FONTAWESOME constants from bootstrap/theme.php 2019-08-30 18:41:51 -07:00
Cameron
2e5cf680e3 Fixes #3912 Theme visibility script flag fix. 2019-08-22 14:36:03 -07:00