1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00
Commit Graph

12473 Commits

Author SHA1 Message Date
Nick Liu
a0f4489e41 Disabled db_verifyTest::testGetIndex() due to no assertions 2020-01-18 16:35:18 +01:00
Nick Liu
b8d6b9eccb Type and null checks for pluginsTest 2020-01-18 16:35:18 +01:00
Nick Liu
fc6b81fdd4 Fix undefined constant by importing LAN in e_marketplace
Apparently e_marketplace depends on the admin area theme LAN
2020-01-18 16:35:17 +01:00
Nick Liu
622be85140 Type checks involving e_formTest
- MOD: e107::getTemplate() now accepts blank strings for the plugin name to mean
       that a core template should be loaded
- FIX: e_form::progressBar() now supports input values that already have % at the end
- FIX: Null check for $options['list'] in e_form::progressBar()
- NEW: Test rounding in e_formTest::testProgressBar()
2020-01-18 16:35:17 +01:00
Nick Liu
46b541889f Fixed array key absence check in e_db_abstractTest::testDb_Fetch() 2020-01-18 16:35:17 +01:00
Nick Liu
15de2e233b Null check for e_file::file_size_decode() 2020-01-18 16:35:17 +01:00
Nick Liu
d2d0105378 Null check for UserHandler::userClassUpdate() 2020-01-18 16:35:16 +01:00
Nick Liu
509b9ff761 Type check for online_shortcodes::sc_online_member_user() 2020-01-18 16:35:16 +01:00
Nick Liu
dbdb5f4a86 Fix e_arrayTest::testUnserialize()
e_DEBUG is already set because of the new test debug strategy
2020-01-18 11:38:39 +01:00
Nick Liu
1d72d48a35 Type checks for db_verify::prepareResults() 2020-01-18 11:38:36 +01:00
Nick Liu
ce510159a9 Removed useless STRPTIME_COMPAT constant 2020-01-18 11:05:09 +01:00
Nick Liu
24fe5c80ac Updated pclzip.lib.php to v2.8.4 to fix math error
Also suppress mkdir() error in e_file::unzipGithubArchive()
2020-01-18 11:05:09 +01:00
Nick Liu
82499f70a9 Debug variable scope fix in e107plugin::XmlTables() 2020-01-18 11:05:08 +01:00
Nick Liu
1561992815 Removed unused variable from e107plugin::XmlAdminLinks()
Was causing an undefined index error
2020-01-18 11:05:08 +01:00
Nick Liu
98911f0b8e Guard type errors in e_db::insert() implementations 2020-01-18 11:05:08 +01:00
Nick Liu
b2bd6763de Null checks for e107TinyMceParserTest
- FIX: Do not redefine e_ADMIN_AREA in parser.php
- FIX: Null checks for e107TinyMceParser
- FIX: Array type check for e_bbcode::imgToBBcode()
- FIX: Optional query string in e_parse::thumbUrlDecode()
- FIX: Don't redefine TINYMCE_UNIT_TEST
2020-01-18 11:05:08 +01:00
Nick Liu
c604b3019c Fixed type check in e_form::option_multi() 2020-01-18 11:05:07 +01:00
Nick Liu
8e0b047a73 array_diff_recursive() type check for recursion 2020-01-18 11:05:07 +01:00
Nick Liu
66a9765f50 Corrected subset check in user_classTest::testGetUsersInClass() 2020-01-18 11:05:07 +01:00
Nick Liu
78a5c2aec7 Disabled e_onlineTest::testGoOnline() – has no assertions 2020-01-18 11:05:06 +01:00
Nick Liu
b4e48f8cbf Fix duplicate constant in lancheckTest 2020-01-17 19:08:46 +01:00
Nick Liu
62a547aed2 Fixed E_NOTICE in plugin install/uninstall process
- FIX: e107::coreLan() now loads the lan_admin.php file if the $admin argument is true
- FIX: Variable scope of $eplug_folder in e107plugin::uninstall()
- FIX: isset() check order in pluginsTest::makePluginReport()
- FIX: class2.php: Missing ADMINPERMS constant in CLI mode
2020-01-17 17:11:26 +01:00
Nick Liu
bfad3f7202 Suppressed constant already defined errors in e_db_mysqlTest 2020-01-17 15:57:34 +01:00
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
b9d4961571 Turn off web error handler for CLI (breaks a lot of stuff!)
error_handler now only runs set_error_handler in web mode.

E_ALL notices, warnings, and errors are now reported, which causes
the test harness to fail.
2020-01-17 14:48:55 +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
Cameron
15e76c84d1 Revert last test as e107::redirect() will correct any entity detected. 2020-01-14 13:57:33 -08:00
Cameron
4aa5ac8622 Issue 4054 Added test for e107::url() with 'mode' => 'full' as often utilized by e107::redirect() 2020-01-14 13:45:35 -08:00
Nick L
9488fdcdc3 Merge pull request #4067 from Deltik/fix-4054
Compliant query string ampersands in e_url
2020-01-14 10:17:02 +01: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
Nick Liu
75d1ae2649 Hard-coded Code Climate test reporter ID
Apparently, there's no easy way to submit coverage reports from GitHub pull request builds
without exposing this reporter ID. Coverage diff reports should now come in from pull
request builds after this commit. The expectation is that Code Climate will comment on the
pull requests and mark the build as failed or succeeded based on the coverage diff.

This commit also disables sending code coverage reports to Codecov, which has been broken
for a while now: https://github.com/codecov/codecov-action/issues/43
2020-01-13 00:54:30 +01:00
LaocheXe
e01f1a4345 Delete Account Option
Delete Account Option added in admin  area. Also updated the default_install.xml to add missing core options.
2020-01-10 08:28:17 -06:00
Nick L
08b9041039 Categorized issue types under "types:"
Based on feedback from https://github.com/e107inc/e107/issues/4054#issuecomment-571527342
2020-01-07 21:15:38 +01:00
Tijn Kuyper
530914f631 Added Jetbrains reference link to Sponsor button
b812fd1bdc (commitcomment-36595755)
2020-01-02 10:44:53 +01:00
Cameron
a7c177c9f0 Merge pull request #4047 from Serios/patch-14
Fixing an issue that with contact form sending unnecessary additional…
2019-12-31 11:38:11 -08:00
Cameron
2a6e3a182d Issue #4020 - Removed Admin Nav button labels for all device and provided solution for plugins to add them back via css if required. Example added to admin_style.css 2019-12-31 11:24:14 -08:00
Nick Liu
0b269013c1 Added an issue template for questions 2019-12-30 15:07:58 +01:00
Nick Liu
d31f4cd45e E107Preparer: Clean up hidden files as well
Fixes test run cleanup errors that look like:

    In ErrorHandler.php line 83:

      rmdir(W:\www\e107v2/e107_system/000000test/): Directory not empty

Or:

    In E107Preparer.php line 27:

      E107Preparer couldn't delete W:\www\e107v2/e107_system/000000test
2019-12-30 11:15:43 +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
b26c0abfbb Merge pull request #4053 from e107inc/fix-4052
Fixes #4052 Use canonical file system paths in e_fileTest::testUnzipGithubArchive()
2019-12-29 12:18:40 -08:00