525 Commits

Author SHA1 Message Date
Juan Leyva
296ab1e253 MDL-53175 file: Allow file_rewrite_pluginfile_urls to reverse 2016-03-30 09:37:32 +01:00
Ben Kelada
288c8cb7f1 MDL-52261 filelib: Do login check for files in blocks 2015-12-04 11:00:05 +11:00
Jun Pataleta
0c4c3b9aed MDL-44828 filelib: Fix open error for force-downloaded files in mobile
Allow guessing of file's MIME type by default. Fallback to
application/octet-stream if MIME type cannot be determined.
2015-08-14 09:54:20 +08:00
Eloy Lafuente (stronk7)
9a1adda585 MDL-49497 curl: keep api private and test it using reflection.
While strictly we should not be testing private APIs, in order
to get this backported to stables without changing visibility
we use reflection to access to such private properties and methods.

Also added one exttest to verify user agent is properly sent.

Finally, fix some wrong whitespace and changed the helper class name
to better alternative.
2015-06-23 17:20:20 +02:00
Dave Cooper
300fcae31d MDL-49497 curl: Allow configurable User-Agent.
Thanks to Kartik Yadav for assistance with this patch.
2015-06-23 15:59:59 +02:00
Marina Glancy
6218473334 MDL-28954 cohorts: support files in cohort descriptions 2015-06-08 09:18:45 +08:00
sam marshall
b3d7eb6ed4 MDL-48946 Files: New custom description format_string call
The format_string call used when getting file type descriptions
does not specify a context. The page context is not always
available at this point, so for consistency it should specify
the system context.
2015-01-22 13:27:50 +00:00
Dan Poltawski
c67c00a6fe Merge branch 'MDL-42616-master' of https://github.com/sammarshallou/moodle 2014-12-22 12:13:31 +00:00
sam marshall
91fed57a4e MDL-42616 filelib: Use config value for custom MIME types (1/2)
Uses a new optional config variable to define custom MIME types
in JSON format. Includes new API for accessing and modifying
this data.
2014-12-19 14:48:59 +00:00
Frederic Massart
38a73bf4ae MDL-48495 curl: Limit usage of curl to HTTP and HTTPS protocols 2014-12-16 10:08:33 +00:00
Dan Poltawski
1f182f95e7 Merge branch 'MDL9443_Filter_XHTML_files.2014-11-19' of git://github.com/Dave-B/moodle 2014-11-24 17:26:30 +00:00
David Balch
112aed6035 MDL-9443 core_files: Also filter .xhtml resources.
Change the filters to treat .xhtml files the same as .html,
so they are filtered by both "All files" and "HTML files only".
2014-11-19 14:14:50 +00:00
Matteo Scaramuccia
bb8ed60a3c MDL-48023 Files API: Theme files must be cache-able by shared proxies.
The profile image AKA user icon will be cache-able by shared proxies too,
under its specific accessibility constraints/conditions.
2014-11-16 09:53:27 +01:00
Petr Skoda
7ee4642bcb MDL-48013 calendar: force download of user files 2014-11-04 01:40:52 +01:00
Juan Leyva
3ca3d259e5 MDL-47545 web services: Allow cross origin requests for file downloads 2014-10-24 17:10:44 +02:00
Matteo Scaramuccia
8045696b37 MDL-36669 Filters: Remove the last ref to the UFO library. 2014-10-20 23:17:50 +02:00
Tony Butler
1e31f11852 MDL-28484 core_lib: Add function for https detection
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-10-03 13:02:29 +01:00
Dan Marsden
9528f643d1 MDL-47404 filelib: Prevent flash from treating files as uploads
added to send_stored_file as well.
2014-10-01 15:05:56 +13:00
Dan Marsden
7f68cc6541 MDL-47404 filelib: Prevent flash from treating files as uploads
Flash treats files as uploads if filename is passed in content-disposition
this causes security to be enforced that causes issues with SCORM packages
2014-09-25 13:21:47 +12:00
Matteo Scaramuccia
cfa5bd1f3f MDL-46985 Added 7-Zip and RAR MIME types. 2014-08-31 22:33:28 +02:00
Simey Lameze
feff774adb MDL-43063 core: fix phpdoc comment codechecker issue. 2014-07-21 10:08:41 +08:00
James McLean
855d8a2c49 MDL-45418 Files: Adding publisher docs to Filetypes 2014-06-10 19:09:27 +02:00
Tim Hunt
5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
Krister Viirsaar
ecdb94d3e0 MDL-43570 filetypes: Added new filetypes - ddoc, bdoc, cdoc 2014-04-30 13:04:34 +03:00
Tim Lock
1349800dd7 MDL-45012: Enable support for wma files within tinymce Moodle Media plugin 2014-04-14 08:31:17 +09:30
Henning Bostelmann
c746c60803 MDL-44502 filelib: Add mimetype for Maple worksheets 2014-03-14 11:39:07 +00:00
Dan Poltawski
4e5fb5bec1 Merge branch 'm27_MDL-40379_Prevent_Some_Mobile_Network_Providers_From_Modifying_Content' of https://github.com/scara/moodle 2014-01-07 12:42:33 +08:00
Damyon Wiese
e011f229a8 Merge branch 'w01_MDL-43402_m27_zlib' of https://github.com/skodak/moodle 2014-01-07 12:29:45 +08:00
Petr Škoda
90627d9d59 MDL-43527 eliminate last references to safe_mode
Safe mode is not availabel in PHP 5.4 any more...
2014-01-02 09:23:15 +08:00
Matteo Scaramuccia
c3a3f54053 MDL-40379 Files Prevent mobile network providers from modifying content. 2013-12-28 13:56:19 +01:00
Petr Škoda
b19d75a264 MDL-43402 let's try to remove @ silencing from gzip related code
If anything goes wrong on multiple production sites we can just
revert this commit, that is why it is separete from the rest
of zlib stuff.
2013-12-27 11:06:18 +08:00
Sam Hemelryk
a59a423926 Merge branch 'MDL-42084-master' of git://github.com/sammarshallou/moodle 2013-12-03 11:12:34 +13:00
Frederic Massart
102230b23c MDL-42951 curl: Always keep the last headers of a request 2013-11-28 12:00:42 +08:00
Frederic Massart
ba72e295c2 MDL-42985 curl: Correctly apply rule proxybypass 2013-11-21 09:56:54 +08:00
sam marshall
3ef7279f26 MDL-42084 Core: Change set_time_limit to core_php_time_limit::raise everywhere
Exceptions (places where set_time_limit is still left) are:

Third-party libraries:
  ADODB
  PHPMailer

Moodle core:
  PHPUnit - not relevant (CLI mode)
2013-11-06 16:40:01 +00:00
Petr Škoda
0c431257e9 MDL-42387 standardise file lifetime handling 2013-11-01 10:42:18 +01:00
Marina Glancy
d90c811585 MDL-41337 files: Fixed bug with accidental delete of the root directory 2013-10-29 20:29:35 +11:00
Dan Poltawski
d0041fb110 Merge branch 'w43_MDL-38743_m26_private' of https://github.com/skodak/moodle 2013-10-23 13:15:48 +08:00
Petr Škoda
29c43343a2 MDL-38743 add private cache headers 2013-10-18 15:54:43 +02:00
Petr Škoda
9cc5f32b22 MDL-42386 fix invalid etag comparison
Credit goes to Eloy Lafuente, thanks!
2013-10-18 14:48:40 +02:00
Dan Poltawski
07b0214588 Merge branch 'm26_MDL-40226_Add_JNLP_MIME_Type_Support' of https://github.com/scara/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2013-10-09 16:46:56 +08:00
Sam Hemelryk
f18f96f767 Merge branch 'wip-MDL-42016-master' of git://github.com/marinaglancy/moodle
Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
2013-10-09 15:58:45 +13:00
Matteo Scaramuccia
fd43a49b72 MDL-40226 Files: Added the correct MIME Type for JNLP files.
JNLP stands for Java Network Launch Protocol, used to launch
Java Web Start applications. More details in:
http://docs.oracle.com/javase/tutorial/deployment/webstart/deploying.html
2013-10-06 16:22:34 +02:00
Marina Glancy
2a68ee0eb1 MDL-42016 files: Properly synchronise internal references 2013-10-06 18:05:05 +11:00
Petr Škoda
38fc013025 MDL-42040 refactor core Moodle shutdown handlers logic 2013-10-04 11:36:46 +02:00
Petr Škoda
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Sam Hemelryk
da8cd86f17 Merge branch 'MDL-38194-master' of git://github.com/sammarshallou/moodle
Conflicts:
	lib/upgrade.txt
2013-09-16 13:56:05 +12:00
Sam Hemelryk
cf13da65e1 Merge branch 'MDL-36316-master' of git://github.com/danpoltawski/moodle 2013-09-16 13:13:41 +12:00
sam marshall
137885b7e9 MDL-38194 Files: Allow download of large backup files
The PHP readfile function does not work for files more than 2GB.
This commit provides a wrapper that can be used so that files less
than 2GB are sent with readfile, and files larger than 2GB are
sent manually.

The change applies to all uses of pluginfile.php, although in
reality, backup files are probably the only ones likely to be more
than two gigabytes.
2013-09-13 14:59:57 +01:00
Dan Poltawski
378b3eac83 MDL-36316 useragent: Reduce user agent sniffing
* core_useragent: Introduce is_vendor methods to improve readability
  when we are just detecting if a browser is from a vendor, rather than
  the exact version

* Remove uncessary browser version checks when we are just detecting
  vendors - this makes the intention of our sniffing clearer.

* Remove sniffing for browsers which we do not support, grades/ajax/tinymce
  all support modern browsers so there is no need to sniff for them.
2013-09-13 14:25:37 +08:00