1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 22:27:34 +02:00

106 Commits

Author SHA1 Message Date
rica-carv
f6989d795b Update download_class.php 2025-03-27 20:13:11 +00:00
Moc
b95712578a #4687 - Cleanup download meta description
Not ideal yet. See comment by @CaMer0n: https://github.com/e107inc/e107/issues/4687#issuecomment-1215081731
2022-09-05 20:45:50 +02:00
Cameron
2c9afc83ee More PHP 8.1 fixes. 2021-11-26 12:36:25 -08:00
Cameron
9d6a9611e2 PHP 8.1 fixes. 2021-11-25 10:18:53 -08:00
Cameron
4aa66c1732 strftime() added to php_compatibility_handler.php and all references updated. README updated. dateAlternativeTest updated to pass on Windows. (TBD) 2021-11-25 08:51:32 -08: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
Cameron
340ff05fcd Bootstrap5 markup added to download item pagination. Fallback added to e107.css 2021-02-21 14:13:01 -08:00
Cameron
f055b49d91 PHP8 Plugin code cleanup 2021-01-21 09:38:38 -08:00
Cameron
f091709847 Issue #4352 - Canonical added for page, forum and download. Replaced some e_PAGETITLE with e107::title() 2021-01-19 09:50:02 -08:00
Cameron
5b82c292b1 Code cleanup 2020-12-18 19:55:12 -08:00
Cameron
42f0e902d4 Issue #4283 - Update deprecated sql method usage. Removed old code. 2020-12-17 05:52:54 -08:00
Cameron
f605ddc552 Code optimization and cleanup. 2020-12-10 15:52:48 -08:00
Cameron
09fb747374 Code cleanup 2020-12-05 14:13:18 -08:00
Cameron
e1593de8ee Removed redundant PHP closing tags. 2020-08-10 15:49:44 -07:00
Deltik
a8887d2a5e Support NGINX $host in Downloads hotlink protection
Fixes: #4010
Related: #3111

==== Problem ====
If there are two download mirrors, `slow.example.com` and
`fast.example.com`, hotlink protection using an NGINX `secure_link_md5`
expression in the Downloads plugin cannot distinguish between these
hostnames.

This means that a user limited to `slow.example.com` can change the
download host to `fast.example.com` and download from the better mirror.

==== Solution ====
To solve this, `NginxSecureLinkMd5Decorator` needs to support the NGINX
`$host` variable.  Having this variable in the expression will lock down
the secure link to the specific download host.
2019-11-05 13:33:48 -06:00
Tijn Kuyper
e470f4b786 #3270 - Download meta description 2019-10-29 16:58:03 +01:00
Tijn Kuyper
46f01e17bf Fixes #3270 - Download meta description limit and formatting 2019-10-29 15:33:54 +01:00
Tijn Kuyper
b01f5cbb19 Make sure user has appropriate rights to report a broken download
Prevents 'spam' broken download reports
2019-10-29 12:56:57 +01:00
Tijn Kuyper
1b9251e75f Fixes #3622 - Reported broken downloads reworked
- Moved away from e107_admin/message.php to its own place in the Downloads admin area.
- Notification of broken downloads now controlled by e_notify (see Admin Area > Settings > Notify)
- Updated notification message
- Added e_dashboard addon to show latest status on broken download reports
2019-10-27 21:40:59 +01:00
Tijn Kuyper
e5f024e669 #3622 - Download plugin - moving 'Report Broken Download' to e_notify
Work in progress:
- Convert previous 'download_email' pref
- Move broken download list to download plugin admin  /e107_admin/message.php
2019-10-27 18:20:59 +01:00
Cameron
76bb75e802 Fixes #3909 - Fatal error on view download when entry is missing. 2019-08-22 14:51:35 -07:00
Cameron
1d311ff543 Magic Shortcode added for current breadcrumb. {---BREADCRUMB---} e107::breadcrumb() method added for plugins to set/get values. 2019-06-14 14:32:58 -07:00
Cameron
1dbc90143f Case cleanup toHtml() should be toHTML() 2019-02-26 12:22:36 -08:00
Cameron
b46906aebf Merge pull request #3273 from SimSync/fix_3271
Fixes #3271 Updated class construtor to __construct()
2018-07-12 13:49:59 -07:00
Achim Ennenbach
c366204766 Fixes #3271 Updated class construtor to __construct()
Replaced deprecated methods with current ones
Reformated the sourcecode
Updated method DocBlocks
2018-07-12 19:02:33 +02:00
Achim Ennenbach
2b2737ae41 Fixes #3056 Fixes the fatal error in case no records were found 2018-07-12 12:48:01 +02:00
Nick Liu
25310a901b Downloads plugin compatibility with PHP 5.4, 5.5
- FIX: Avoided use of PHP 5.6 feature in Downloads plugin's
       NginxSecureLinkMd5Decorator

Fixes: #3135
2018-05-23 19:37:00 -05:00
Nick Liu
4af400fd75 Refactored some Downloads plugin code 2018-05-01 07:46:48 -05:00
Nick Liu
e36b029f78 Fixed Downloads security NGINX MD5 generation
- FIX: Blocker bug generating the wrong MD5 string for NGINX
       secure_link_md5
- FIX: Bad instructions in LAN_DL_SECURITY_DESCRIPTION
2018-05-01 05:26:40 -05:00
Nick Liu
0d7f7dc543 Improved: Downloads >> Preferences >> Protection
- MOD: Refactored NGINX secure_link_md5 decorator into interface and
       class in Downloads plugin
- NEW: Downloads plugin: Admin preferences UX improvement:
       Preferences >> Protection now shows the user a list of
       supported NGINX variables pulled from
       NginxSecureLinkMd5Decorator
2018-04-30 06:24:20 -05:00
Cameron
1fa54cf1da Issue #2960 Downloads and tablerender style issue. 2018-01-09 14:10:56 -08:00
Cameron
80d69c4293 Issue #2788 - Shortcode parsing in Download Denied Message. 2017-09-19 13:28:56 -07:00
Cameron
963f35ded1 Downloads: Fixes #2576 - Report Broken Download breadcrumb URLs and cleanup. 2017-05-05 10:11:40 -07:00
Cameron
2e2d34d4a6 Downloads: Fixes sub-category rendering on older themes. 2017-04-20 12:07:49 -07:00
Cameron
b38183035d Download URL fixes 2017-04-13 09:43:29 -07:00
Cameron
8d077da40e DownloadsL Pagination (next/prev) fix. SEF Url methods updated. 2017-04-12 15:38:09 -07:00
Cameron
1b1de9cda7 Issue #2486 - Downloads templatea fix. Breadcrumb fix. Replacement e_url profile added. 2017-04-10 13:29:05 -07:00
Cameron
80fbb2a334 Meta-Tags: Issue #2544 - avoid duplication. 2017-03-31 15:49:33 -07:00
Cameron
3758d55e1c Downloads: Issue #2544 - Fix for e_PAGETITLE. 'view/pagetitle' template added. 2017-03-31 15:19:19 -07:00
Cameron
3c65faf6e3 Downloads: #2544 download meta tags. Apple-icon fix. 2017-03-31 14:58:22 -07:00
Cameron
c581b89aa1 Download breadcrumb fix. 2017-03-27 09:43:21 -07:00
MikeyGMT
af17dffcaa More Duplicate LANS #6 LAN_NONE LAN_SUBMIT
More Duplicate LANS #6 LAN_NONE LAN_SUBMIT
2017-02-10 22:34:17 +00:00
Tijn Kuyper
c80bb4c407 Styling issue on download error message 2017-02-09 11:16:47 +01:00
Cameron
30092ef372 GUI styling fixes. Theme thumbnail preview corrected on missing preview images. 2017-02-01 08:54:28 -08:00
rica-carv
5b9126c72e Update download_class.php 2016-12-04 18:27:58 +00:00
rica-carv
c03fb2361e Update download_class.php 2016-12-04 17:59:24 +00:00
rica-carv
7a5086d25c Update download_class.php 2016-12-04 17:33:03 +00:00
Cameron
925704309e Fixes #1486 - Download error-page redirect issue. 2016-04-05 10:26:34 -07:00
Cameron
486f3d4961 Issue #1356 - PHP7 Fixes. 2016-02-14 12:15:55 -08:00
Cameron
c98a403bf5 LAN Fixes and notice removal. 2015-07-02 14:15:17 -07:00