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

951 Commits

Author SHA1 Message Date
Nick Liu
45bce2a7aa #4572: e_form: No htmlspecialchars() on "other" attributes
Fixes: #4572

Discussion:
https://github.com/e107inc/e107/pull/4554#issuecomment-926113601
2021-09-23 16:12:52 -05:00
Cameron
4747ad3c6e Merge pull request #4547 from Deltik/fix/4546
Deprecate `e_parse::toJS()`
2021-09-15 12:18:41 -07:00
Cameron
632f33526f Admin-ui: Fix for delete confirmation popup alert. 2021-09-14 14:15:30 -07:00
Nick Liu
20882920a0 Fix all PHP 8.1 test failures
* `strftime()` has been replaced with a polyfill based on `DateTime`.
* Explicit type casts/assertions added where required by PHP 8.1
* `filter_var(…, FILTER_SANITIZE_STRING)` replaced with `strip_tags()`
  or HTML entity encoding of quotation marks, depending on a guess of
  what the intended "sanitization" was
* `http_build_query()` usage type mismatches fixed
* Removed usages of the `FILE_TEXT` constant
* To avoid breaking PHP 5.6 compatibility (function return types),
  `e_session_db` no longer implements `SessionHandlerInterface`.
  Instead, the alternative non-OOP invocation of
  `session_set_save_handler()` is used instead to apply the session
  handler.
* The shim for `strptime()` still calls the native function if available
  but now suppresses the deprecation warning.

* `e_db_pdo` explicitly asks for `PDO::ATTR_STRINGIFY_FETCHES` to
  maintain consistent behavior with past versions of PHP.
* `e_db_mysql` explicitly sets `mysqli_report(MYSQLI_REPORT_OFF)` to
  maintain consistent behavior with past versions of PHP.

* Removed pointless random number generator seed from `banner` plugin
* Workaround for `COUNT(*)` SQL query in
  `validatorClass::dbValidateArray()` without a proper API for avoiding
  SQL injection
2021-09-04 15:06:19 +02:00
Nick Liu
f6d6d1b185 Deprecate e_parse::toJS()
`e_parse::toJS()`, documented with the description

> Convert text blocks which are to be embedded within JS

, does not protect strings from injections, which appears to be its
primary use.  Additionally, it performs multiple unrelated string
modifications:

* Replace Windows line breaks with a literal `\\n` (which would later be
  parsed as `\n` in JavaScript/JSON)
* Does not modify Unix line breaks (`\n`), which is inconsistent with
  the Windows line break behavior
* Removes HTML tags
* Replaces HTML entities as `htmlentities()` does

This method cannot be fixed because its usages are inconsistent.  Most
notably, some usages surround the method's output in single quotes while
others surround it with double quotes.  Strings cannot be JSON-encoded
without confounding quotation mark styles.

All core usages of `e_parse::toJS()` have been replaced with
alternatives, which are also documented in the method's DocBlock.

Fixes: #4546
2021-08-31 00:11:14 +02:00
Cameron
32618817d1 Character counting display added to meta description on admin News and Page inputs. 2021-08-12 11:51:55 -07:00
Cameron
6d0810af0d Fixes #4468 - quick debugging of json data using type: 'text' and hidden() field fix. 2021-03-31 15:14:58 -07:00
Cameron
c33b91ee5c Issue #4368 Fixed hardcoded string for 'related' content. Now uses tablerender(). Shortcode processing of {---CAPTION---} added. 2021-03-22 11:26:51 -07:00
Jimako
467d3c968f Correct pagination for frontend Admin UI 2021-03-02 17:32:18 +01:00
Cameron
cb95b4b243 Hero cleanup for Bootstrap5. Switched to placeholder images. Admin-ui type 'image' now loads remote URLs correctly. 2021-02-26 10:13:07 -08:00
Jimako
ba28818003 #275 fix for empty link in home icon for WAVE 2021-02-21 19:24:43 +01:00
Cameron
cae8cf1345 Fixes #4398 - Page breadcrumb. Disabled breadcrumb on frontpage. 2021-02-18 17:02:37 -08:00
Cameron
2bf5ee3909 Admin area tool tips simplified to a single location. Pref simplified to Enable/Disable. Fixed flip-switch 'e-expandit' failures in Admin > Prefs. 2021-02-12 12:19:58 -08:00
Cameron
7133d4bb6f Closes #4228 TinyMce can now load the frontend theme in the editor when 'wysiwyg' is found in the scope of a declared css file within theme.xml
Fixes #4371 - FontAwesome5 is now loaded in the TinyMce editor when detected in the frontend theme.
2021-02-11 16:39:50 -08:00
Cameron
a1faa5d08b Bootstrap5 styling 2021-02-10 09:03:17 -08:00
Cameron
1f3e70d40a Fixes #4374 help() form method fix. 2021-02-09 14:36:40 -08:00
Cameron
5842e51f15 Prevent tooltip visibility during page load. 2021-02-09 11:07:58 -08:00
Cameron
72c54371cc e107::getSession()->set will now accept multi-dimensional key format. Test added. Form-handler PHP8 fix. 2021-02-08 11:59:04 -08:00
Cameron
c32e5bf1e2 e107::unserialize() will now return the array if the input is an array. Additional form-handler tests added for type: media, file and files. Admin-ui can now manage a change of field type from 'array' to 'json' without additional changes needed. 2021-02-08 08:44:44 -08:00
Cameron
7698773f0e Left-align tooltip text in new admin skins/styles. 2021-02-07 12:20:57 -08:00
Cameron
e4f8082d37 Theme Manager for Admin area, now displays previews of each admin skin. 2021-02-04 16:22:25 -08:00
Cameron
5870fbdb84 "<div class='field-help'>" etc has been replaced by the $frm->help() method and is also used by the admin-ui. 2021-02-04 08:45:10 -08:00
Cameron
82fbeab43c Tool-tip placement options added to admin prefs. (Applies to Admin-ui areas only)
Admin styling tweaks.
2021-02-03 20:38:31 -08:00
Cameron
e4f6d502b9 Admin style tweaks 2021-02-03 08:10:23 -08:00
Cameron
eee039b616 PHP8/Bootstrap5 Fixes 2021-01-29 20:11:49 -08:00
Cameron
a6e341274e Admin template clean up. 2 new admin styles added. (to be improved). Left admin panel collapse improved. (still needs a cookie to 'stick' . 2021-01-29 09:27:38 -08:00
Cameron
296bc650a7 Keep button class in a logical order e107::getForm()->button(); and admin_button() modified. Test added.
'button' has been removed when the action == 'button' in order to avoid BC css conflict. Use button[type="button"] if needed.
2021-01-28 09:36:27 -08:00
Cameron
71b3729341 Admin-ui createForm now uses the internal tabs() method. 2021-01-26 17:46:48 -08:00
Cameron
835e477147 Bootstrap 5 styling. (data-bs-toggle)
Signup shortcodes now automatically load the required template.
2021-01-26 15:08:58 -08:00
Cameron
876212d518 Make sure admin icons are loaded during testing and when initializing form handler. 2021-01-25 12:04:59 -08:00
Cameron
dfddca2e24 Added Media-Manager loading indicator. Use deftrue() for checking admin area in form handler. 2021-01-25 09:35:08 -08:00
Cameron
8f27be1150 Added e_user.php 'settings' method to define additional (extended) user fields dynamically. See _blank/e_user.php 2021-01-18 18:42:03 -08:00
Cameron
f8f40a23fe Missing page-subtitle field added. 2021-01-04 12:48:37 -08:00
Cameron
81634d5f5a Issue #4332 Carousel fixes. Newsfeed now uses json to store data. 2021-01-01 09:33:51 -08:00
Cameron
6e19d79a63 Ajax form fix. 2020-12-31 10:57:22 -08:00
Cameron
5d7f921023 PHP8 Warning fixes. 2020-12-31 09:06:20 -08:00
Cameron
21e3c3f8ab PHP warning fixes. 2020-12-29 09:48:36 -08:00
Cameron
75f595adb0 PHP Warning Fixes. 2020-12-29 08:04:52 -08:00
Cameron
cf566bbf14 Snippets name/value fix. 2020-12-28 15:48:13 -08:00
Cameron
7d04bc5c6a radio snippet added. 2020-12-28 10:29:17 -08:00
Cameron
10482b8a89 Solves the duplicate breadcrumb issue. 2020-12-28 09:48:44 -08:00
Cameron
7dfac0dcfa Issue #4299 - PHP8 compatibility fixes. 2020-12-25 10:23:56 -08:00
Cameron
3cd4aa0018 Form handler code cleanup/optimization. Added getSupportedProviders() caching to reduce execution time. 2020-12-23 12:42:06 -08:00
Cameron
eb47eb7716 Snippet to include id attribute. 2020-12-23 08:35:31 -08:00
Cameron
ffea1449f9 Simplified snippet example. Added caching of loaded snippet. 2020-12-23 08:04:20 -08:00
Cameron
ce7fa515c3 Experimental theme snippets feature added. 2020-12-22 17:06:52 -08:00
Cameron
402d1f4126 Closes #1801 Code cleanup. Deprecated method errors added. 2020-12-22 14:48:28 -08:00
Cameron
630f3f415f Improved detection of deprecated functions/methods and display in DEBUG mode: deprecated. 2020-12-21 10:00:28 -08:00
Cameron
601df26d51 Code optimization for speed and reduced memory usage. 2020-12-20 11:50:10 -08:00
Cameron
5b82c292b1 Code cleanup 2020-12-18 19:55:12 -08:00