1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-28 16:50:07 +02:00

538 Commits

Author SHA1 Message Date
Nick Liu
a04db4e2c8 Hotfix: Don't fatal error if core_image.php is corrupt 2020-03-29 15:56:33 -05:00
Nick Liu
00d171473e Validation bits improvement for e_file_inspector
Now File Inspector detects old files regardless of their hash value.
2020-03-27 17:06:15 -05:00
Nick Liu
6095c94de3 Minimum viable rewrite of File Inspector frontend 2020-03-27 17:06:14 -05:00
Nick Liu
6f6556178f e_file_inspector_json_phar: Smaller core image
e_file_inspector_json_phar is an extended implementation of
e_file_inspector_json that encapsulates a JSON core image into a
gzip-compressed phar.

This results in space savings of over 60% compared to plain JSON.
2020-03-27 17:06:14 -05:00
Nick Liu
b8ed70693f Restored JSON core image generator for performance
PDO SQLite was performing unacceptably poorly.
Let's just load the entire integrity image into RAM…
2020-03-27 17:06:13 -05:00
Nick Liu
90bdc88d55 Performance of e_file_inspector_sqlphar::pathToDefaultPath()
Optimized performance of e_file_inspector_sqlphar::pathToDefaultPath()
by eliminating expensive method calls
2020-03-27 17:06:13 -05:00
Nick Liu
bb1c32489c Add a version filter to e_file_inspector::getPathIterator() 2020-03-27 17:06:12 -05:00
Nick Liu
0494000356 Rewrote e_file_inspector validation constants
Now uses bit flags, as the previous approach of "overriding" the
validation code may hide information.  Previously,
e_file_inspector::VALIDATION_FAIL could be overridden by
e_file_inspector::VALIDATION_OLD.  Now, e_file_inspector::VALIDATED_HASH
and e_file_inspector::VALIDATED_UPTODATE provides information about
both.
2020-03-27 17:06:12 -05:00
Nick Liu
0e7ad8a1b0 Rewrite e_file_inspector implementation: Use SQLite phar 2020-03-27 17:06:11 -05:00
Deltik
20dbdefb77 Began work on the core_image.php reader 2020-03-27 17:06:10 -05:00
Cameron
852ab5a32f Related to Issue #3741 - Incorrect encoding of a plugin language file could cause json encoding to fail. 2020-03-24 13:57:05 -07:00
Cameron
5471a84746 Fixes #4111 Inconsistent results under some circumstances with e107::getDb()->retrieve(). Tests have been added to this commit. 2020-03-13 15:06:26 -07:00
Cameron
a200d312d8 Added e107::getThumb() to get thumbnailer class. Added a test for it. Styling fix for admin-ui grid. 2020-03-09 13:41:00 -07:00
Cameron
429a61a6ee Added another date test for the future. 2020-03-07 10:02:32 -08:00
Cameron
91d69898df Fix for e_form::name2id() when = and ? characters are detected is found. 2020-03-06 17:08:23 -08:00
Deltik
bdb78a186a Fix for intermittently failing test involving LAN_SETSAVED
---------
1) lancheckTest: Is_utf8
 Test  tests/unit/lancheckTest.php:testIs_utf8

  [PHPUnit_Framework_Exception] Constant LAN_SETSAVED already defined

#1  Codeception\Subscriber\ErrorHandler->errorHandler
#2  /__w/e107/e107/e107_languages/English/admin/lan_admin.php:262
#3  /__w/e107/e107/e107_handlers/e107_class.php:3156
#4  /__w/e107/e107/e107_handlers/e107_class.php:3182
#5  /__w/e107/e107/e107_admin/lancheck.php:18
#6  /__w/e107/e107/e107_tests/tests/unit/lancheckTest.php:18
#7  {closure}
2020-03-06 18:49:23 -06:00
Cameron
76dfad9311 Admin-UI: Fix for $adminMenu attribute 'modal-caption' not functioning. Use 'modal'=>true to enable first. 2020-03-06 14:18:57 -08:00
Cameron
6d0fb9e218 Fix for faulty srcset height value when using overrides and a default. Tests added. 2020-03-02 11:03:28 -08:00
Cameron
1925ce5264 Three dependencies updated and moved to vendor directory:
PHPMailer (upgraded to v6 - more testing required)
JsShink
Mysqldump-php
2020-02-29 11:56:05 -08:00
Nick Liu
b3a30c0059 More logging for intermittent e_plugin test failures 2020-02-29 19:11:17 +01:00
Cameron
331aa5f99e Interface fixes and refactoring to e107 conventions/standards. 2020-02-28 10:33:50 -08:00
Cameron
35e2e3b4aa Merge pull request #4099 from Deltik/fix-3492
New 3rd-party PHP dependency manager for e107 core and HybridAuth upgrade.
2020-02-26 13:58:03 -08:00
Nick Liu
8c072e243b social_setup upgrade renamed providers from HybridAuth 2 to Hybridauth 3 2020-02-25 14:34:29 +01:00
Nick Liu
a350eb41f6 Fixed errors in eIPHandlerTest::testAdd_ban() that broke all tests 2020-02-25 13:13:02 +01:00
Nick Liu
639943e7ed Correct user_xup changed value in Steam social login provider
Info:
https://github.com/e107inc/e107/pull/4099#issuecomment-590579521
2020-02-25 12:48:00 +01:00
Cameron
22323b3c77 Added IPHandler test class. 2020-02-24 16:42:56 -08:00
Nick Liu
be84cf7c08 New interface for varied social login configuration fields
Uses the new e_user_provider::getFieldsOf() API
2020-02-24 22:50:48 +01:00
Nick Liu
f03e60dbd7 New API to get fields of each social login provider
(Not utilized in the admin frontend yet)
2020-02-23 21:47:36 +01:00
Nick Liu
379a963902 New API to detect if social login is enabled site-wide
The site-wide social login system is now backwards-compatible with how
the social_login_active core pref worked since commit
3b2d8333b6.

social_login_active's least significant bit is now treated as a global
bit, so if it's not set, no other bits are allowed to be set. This
un-breaks all existing checks for whether social_login_active is empty.

Except in themes, the social_login_active check has been replaced with
an e_user_provider API to check if social login is enabled site-wide.
2020-02-22 23:55:20 +01:00
Cameron
ca61cd7de5 Issue #4086 Boolean admin-ui form element readParm/writeParm consistency. 2020-02-20 08:12:09 -08:00
Nick Liu
bc4ade5a27 Disable system/xup/test by default
Now guests can't snoop there unless the admin allows it.
Documentation has been improved accordingly.
2020-02-19 23:30:24 +01:00
Nick Liu
a91fa2c9b8 Don't duplicate Hybridauth config in e107::getHybridAuth() 2020-02-19 17:11:26 +01:00
Nick Liu
0bacc5903c Prevent error if 'social_login' pref is not an array 2020-02-19 17:11:21 +01:00
Cameron
0dbad5d72b Issue #4101 toASCII characters added and test added to confirm. 2020-02-17 13:43:39 -08:00
Cameron
df764389a8 Issue #4102 Parsing of < or > 2020-02-17 13:13:06 -08:00
Nick Liu
91bfc1df23 Core modifications to support Hybridauth 3
- MOD: Replaced e107::getPref('social_login') with
       SocialLoginConfigManager::getValidConfiguredProviderConfigs()
- FIX: signup_shortcodes updated with new social login providers
- MOD: e107::filter_request() code de-duplication: HTTP 400 exits
- MOD: Deprecated e107::getHybridAuth() to discourage direct access to
       third-party dependency Hybridauth
- FIX: Updated e_user_provider for Hybridauth 3
- FIX: e_user::tryProviderSession() and Hybridauth 3
- NEW: Dynamic auth provider support in social_adminarea
- NEW: Database migration for social plugin's social_login pref
2020-02-17 10:38:49 +01:00
Nick Liu
2a69227135 Exclude Composer files in GitHub sync for e107 v2 2020-02-17 10:38:47 +01:00
Cameron
89fff6faad Improved line-breaks handling and added test. 2020-02-02 15:11:36 -08:00
Cameron
e15a10234e Parser: Fix for line-breaks when converting HTML back to plain text. 2020-02-02 14:54:29 -08:00
Cameron
48ae6455a4 getUsersInClass() now accepts extended user field names - just prefix those fields with "ue.". 2020-01-23 14:59:01 -08:00
Nick Liu
f23aec7395 Replaced e_date::strptime() with eShims::strptime()
- NEW: Added \e107\Shims\Internal\StrptimeTrait, which implements PHP internal function
       strptime(). On not-Windows, the built-in function is called. If that function fails
       or if the operating system is Windows, the alternative pure PHP implementation is
       attempted. The first successful call is returned, or false if none are successful.
- MOD: Deprecated e_date::strptime() in favor of eShims::strptime()
- FIX: License misatributed for e_date::strptime() (now eShims::strptime()). The library
       used was public domain, not CC BY-NC-SA 2.0 FR by Lionel Sauron.
- MOD: Removed STRPTIME_COMPAT constant now that eShims::strptime() exists
- MOD: Removed support for calling e_date::strptime() with:
       - a localized full month name
       - a localized abbreviated month name
       - AM or PM
       - am or pm
       because these features were only implemented in Windows mode (STRPTIME_COMPAT).
- MOD: php_compatibility_handler.php now defines global strptime() using the
       eShims::strptime() implementation
- NEW: Test all(?) the possibilities of eShims::strptime()
2020-01-22 09:07:27 +01:00
Cameron
e1e8a8b627 Added 'base64' option to allow for embedded image src. (useful when including avatars in email signatures)
Added test for toAvatar() method.
Cleaned up &amp; when found in URL by getRemoteContent()
2020-01-19 15:35:36 -08:00
Nick Liu
f2a7590e68 Workaround for old phpunit/php-code-coverage missing mkdir()
codecept_output_dir() might not exist when the PHP-serialized coverage
report is being generated. phpunit/php-code-coverage >= 6.0.8 fix this
by creating that directory before writing the coverage report.

PHP 5.6 can only get phpunit/php-code-coverage up to version 4.0.8,
which does not have this fix. A workaround has been introduced in this
commit to allow PHP-serialized coverage reports to be stored with PHP
5.6.
2020-01-19 15:41:02 +01:00
Nick Liu
8b354adf44 Don't spam database server with connections
- MOD: Silently ignore failures to e_db_mysql::close(); if it's failing, it's probably already closed
- FIX: Close the PDO or mysqli connection after each e_db_abstractTest test
- MOD: Changed class2.php's $sql variable to be hinted as an e_db instead of e_db_mysql
2020-01-19 14:33:11 +01:00
Nick Liu
72d3f07410 PHP 5.6 fixes for e_db_mysql
- FIX: Don't redefine MYSQL_* constants in e_db_pdo_class.php
- FIX: e_db_mysql::rowCount() could try to use mysql_num_rows() to count rows of a non-resource
- FIX: e_db_mysql::delete() stores the number of deleted rows in e_db_mysql::$mySQLrows
- FIX: e_db_abstractTest::testDb_Query() was fetching in PDO mode but shouldn't have been
- FIX: Typos in e_db_abstractTest::testDelete()
- MOD: Moved PDO-exclusive testBackup() from e_db_abstractTest to e_db_pdoTest
- FIX: e_db_mysqlTest now works in PHP 5.6 if the main e_db instance was in PDO mode but the test
       class initializes in legacy mode
- MOD: e_db_mysqlTest now asserts that PDO mode is not in use
- FIX: e_db_mysqlTest::testGetServerInfo() should now actually get a version number
- FIX: e_db_mysqlTest::testGetLastErrorNumber() has a different error code compared to PDO
- FIX: e_db_mysqlTest::testEscape() should actually get something from mysql_real_escape_string()
2020-01-19 12:30:23 +01:00
Nick Liu
510d8e231f Fix flaky e_pluginTest::testBuildAddonPrefList()
Apparently requires the "gallery" plugin to be installed
2020-01-18 19:14:06 +01:00
Nick Liu
be8f2bbeb6 Fixed PHP 7.3 warnings
- FIX: Silenced compact() in e107Test::testInitCore()
- FIX: Null check in e_db_pdo::makeTableDef()
- FIX: Null check in e_db_mysql::makeTableDef()
- FIX: userlogin::login() had this warning on line 148:
       "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
2020-01-18 18:52:20 +01:00
Nick Liu
d55fe8a77b Import LAN for e_formTest::testRenderElement() 2020-01-18 16:36:23 +01:00
Nick Liu
d1bdfb8546 Type checks and corrections for e_parse::thumbSrcSet() 2020-01-18 16:35:21 +01:00
Nick Liu
207ce81106 Bring class2Test::testCheckClass() back to passing (workaround) 2020-01-18 16:35:21 +01:00