Commit graph

134 commits

Author SHA1 Message Date
awjrichards
c29fd59775 Big oops - merged to wrong branch.
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"

This reverts commit ee0d3d330f
2012-06-05 22:58:54 +00:00
awjrichards
ee0d3d330f Revert to arbitrarily old point before initial remote branch creation to help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
2012-06-02 08:43:04 -07:00
Alexandre Emsenhuber
58bb669812 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ia1a7230adc92079b505362317d2e03b36130cc8b
2012-05-29 13:01:11 +02:00
Aaron
4b0a61227f [Upload] Added various profiling calls to upload code.
Change-Id: Ib13be24393eee05e3af4a942a1c8cdcf590b0da9
2012-05-16 16:44:48 -07:00
csteipp
8a367b93e5 (bug 29296) Expanded Blacklist for SVG Files
Expanded detection of scripts inside SVG Files. Catches known
hostile files with minimal false-positives.

Disallows SVG Files that include remote resources, to protect
reader's privacy.

Change-Id: I5ba75ad621cdb0355351c8a9a0f1dbea552c258f
2012-05-01 13:35:49 -07:00
Aaron Schulz
73d3769e0c Removed unused saveTempUploadedFile() function
Change-Id: I262936a2a68b745f6fb3235a21652a4ad3737e39
2012-03-29 18:54:26 -07:00
Sam Reed
09a78c1368 More return documentation 2012-02-09 21:36:14 +00:00
Sam Reed
0a626db6e1 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 19:29:36 +00:00
Antoine Musso
2bf8d0db90 Fix doc for includes/upload 2012-02-08 17:03:43 +00:00
Aaron Schulz
5275f9b097 Merged FileBackend branch. Manually avoiding merging the many prop-only changes SVN likes to sprinkle in (easy to spot from the change list). Did not add SwiftFileBackend.php as it still is in development. 2011-12-20 03:52:06 +00:00
Jeroen De Dauw
49cdca93be add missing deprecation notices and added deprecation version to existing ones 2011-12-13 05:19:05 +00:00
Jan Gerber
0095c08ed2 Use database to track uploaded chunks and concatenate at the end.
with i18n documentation dont break phpunit

follow up r93720
2011-11-30 14:56:40 +00:00
Roan Kattouw
e83bb90997 Revert r104659 and its followup r104665: break the unit tests with a fatal error. This cripples our CI system, we can't detect new failures this way. 2011-11-30 13:54:35 +00:00
Jan Gerber
d70c169b90 Use database to track uploaded chunks and concatenate at the end.
follow up r93720
2011-11-30 08:55:16 +00:00
Roan Kattouw
d14f8c89a0 (bug 1672) Add $wgDisableUploadScriptChecks to allow disabling of the HTML/JS detection for uploads. Patch by Emufarmers 2011-11-20 18:57:47 +00:00
Mark A. Hershberger
a40a045f5f w/s fixup 2011-11-03 16:47:42 +00:00
Bryan Tong Minh
f3fc3c7f43 Follow-up r98430, use dedicated error message for filename too long error. Adds 'filename-toolong' message. 2011-10-07 18:20:55 +00:00
Bryan Tong Minh
c48b61c01b (bug 30202) Restrict file names on upload to 240 bytes, because wfTimestamp( TS_MW ) . '!' . $fileName should fit in oi_archive_name, which is 255 bytes, and also the maximum file name length on many file systems is 255 bytes.
Commit to fix UploadTest to use @dataProvider will follow
2011-09-29 19:00:45 +00:00
Aaron Schulz
15ae38d52f Partial revert of r65898 (bug 27700). Callers should check 'create' and Title will internally check the proper subpermission depending on the title namespace. 2011-09-08 19:28:03 +00:00
Ian Baker
a26afff4e0 Cleaning up little things, updates to code clarity, documentation fixes per Catrope's suggestions.
followup to r94536, r94592, r94594
2011-08-16 17:57:32 +00:00
Brian Wolff
9ccad8e8b3 follow-up r88171 - fix fatal if suggested filename has illegal character in it.
Check to make sure the title object actual exists, before checking its namespace,
since alll the does this have illegal chars check is done after the does it
start with file: check.

For future note though, when using upload by url feature, the suggested
destination name when you put http://upload.wikimedia.org/wikipedia/commons/e/e0/Petrorhagia_prolifera_%281%29.JPG is illegal, which is probably not very user-friendly (filed as bug 30390)
2011-08-16 05:37:18 +00:00
Ian Baker
53f3c48a95 Removed the ability to pass a key into stashFile(), which simplifies the stash row creation a great deal.
Updated UploadFromUrlJob to properly use the database stash
followup to r92200
2011-08-15 23:58:40 +00:00
Mark A. Hershberger
b526cd0d68 Bug #29874 - Image extension strict whitelist handling is inconsistent
Patch from Dan Collins
2011-07-18 18:05:45 +00:00
Ian Baker
9b50e7ade7 properly handle the case where a file disappears during the uploadwizard process
remove database records for files that move out of the stash
2011-07-14 23:01:00 +00:00
Ian Baker
9d4fd0c567 Refactored UploadStash and related classes to use the database for file metadata storage instead of the session, see bug 26179
Tweaked the UploadWizard to work properly with the new backend code, updated tests
2011-07-12 21:11:43 +00:00
Chad Horohoe
17492955f6 public static 2011-07-06 17:15:04 +00:00
Matěj Grabovský
5b11098eaf Follow-up r90369: Add third parameter to filetype-unwanted-type (for PLURAL)
Also use params() insted of numParams() on an ocassion, as it's not really needed there
2011-06-22 13:35:24 +00:00
Matěj Grabovský
3533cc1921 (bug 29325) Setting $wgStrictFileExtensions to false gives incorrect warning
Also use Language::commaList
2011-06-18 21:27:24 +00:00
Krinkle
32d29b93ea (bug 28556) Remove MacBinary
* IE5 for Mac is history.
2011-06-13 19:00:49 +00:00
Sam Reed
b15737fa83 And even more documentation, the last of this batch 2011-05-28 19:00:01 +00:00
Alexandre Emsenhuber
5833875a19 Simplify a bit :) 2011-05-27 19:15:13 +00:00
Tim Starling
4c63ef444a Some HipHop fixes:
* Scan the C++ for volatile classes and show a warning with a list of them
* Fixed volatile classes Revision, CoreLinkFunctions and FileRepoStatus, made them non-volatile by patching the referring code
* Added some configuration for the build process to DefaultSettings.php. 
* Split a few functions off MakeHipHop::execute()
* Only include UtfNormalDefines.php in interpreted mode, since in compiled mode, the constants exist from startup
* Apparently HipHop does not support set_exception_handler(). Added a try/catch block around the main part of index.php instead.
* Fixed ini_get() dependencies in Special:Upload. Upload now works, if you disable ZipDirectoryReader.
2011-05-27 06:25:21 +00:00
Russ Nelson
84876723bb Swift needs to rewrite entire files. We need this call to prevent N**2 operations while appending 2011-05-23 01:18:06 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Bryan Tong Minh
6d4b3584a1 (bug 23464) File: prefixes are now chopped off during uploading. 2011-05-15 12:51:52 +00:00
Bryan Tong Minh
b21d160c83 (bug 1780) Uploading files with non-ascii characters are now forbidden on Windows. PHP on Windows does not reliably support non-ascii characters to forbid them all. Theoretically we could detect the filesystem locale and iconv the filename, but that is just too much hassle. Added message 'windows-nonascii-filename'. 2011-05-15 12:35:50 +00:00
Neil Kandalgaonkar
43cf8e6d6e change the name of UploadBase::verifyPermissions() to verifyTitlePermissions() for clarity. A wrapper function is left for extensions that rely on the old method 2011-03-25 20:37:26 +00:00
Sam Reed
908254604e Followup r65898, fix inverse logic for title existence
Related to bug 27470 and bug 28166
2011-03-22 22:22:39 +00:00
Mark A. Hershberger
2e61719bdb Followup r83536 to address Jack Phoenix's comments about the bogus w/s “cleanup” 2011-03-18 20:58:12 +00:00
Sam Reed
301153d47c * (bug 28034) uploading file to local wiki when file exists on shared repository (commons) gives spurious info in the warning message
Applying patch with one minor addition
2011-03-14 23:33:45 +00:00
Mark A. Hershberger
b3df4babc2 misc w/s cleanups, “svn diff -x-w” clean 2011-03-08 18:12:17 +00:00
Bryan Tong Minh
9fb510f31d (bug 26995) File size is now checked before uploading in HTML5 browsers
* Exposed $wgMaxUploadSize to JS
* Exposed message largefileserver to JS
2011-03-04 15:38:37 +00:00
Sam Reed
c07330264d Tweak documentation
Fix constant use in UploadTest
2011-02-27 21:11:45 +00:00
Tim Starling
0a21e2de12 * (bug 24230) Added JAR detection. ZIP archives containing a .class file will be rejected by default. Malformed ZIP archives will be rejected due to the danger of ambiguous parsing on the client side.
* Removed the ZIP subtypes from $wgMimeTypeBlacklist, they no longer need to be there.
* Added ZipDirectoryReader. Added some small ZIP files which are used to test its various error cases. Most were constructed with a hex editor.
* Fixed getStatusArray() to return a consistent type regardless of whether the error message has parameters. This allows error messages with no parameters to work with the Status object conversion code in UploadBase::verifyFile().
2011-02-25 04:51:17 +00:00
Sam Reed
baf83f74b8 More explicit variable definitions, function documentation 2011-02-20 13:33:42 +00:00
Mark A. Hershberger
ec4dbd13cd Bug #26059 — Add support for KML/KMZ filetype
Patch from Derk-Jan Hartman of which he writes:

    I figured adding kml support would be a breeze, but I had not
    counted on the brain dead browser that is IE6.

    Unfortunately, kml contains the element <heading, which triggers
    the protection in detectScript() that protects from uploads that
    IE6 might mistake for HTML.  It triggers on "<head" not sure if we
    can work around this, but Tim will know.
2011-02-19 03:22:03 +00:00
Sam Reed
fa64025161 More parameter documentation 2011-02-19 00:30:18 +00:00
Sam Reed
2c6e16e5e5 Remove unused variables 2011-02-18 01:10:38 +00:00
Sam Reed
bdb325cb4e Fixup some trailing newlines
Fixup indentation of a few methods

Add a couple of return type hints
2011-02-02 10:42:17 +00:00
Platonides
56eee48fcf Remove empty statement (r80993) and unused global (r80766). 2011-01-28 17:34:37 +00:00