Commit Graph

1053 Commits

Author SHA1 Message Date
Bernhard Posselt 63f2f16b85 use new controllermethodreflector for corsmiddleware 2014-05-11 17:55:59 +02:00
Bernhard Posselt 1d45239c65 adjust license headers to new mail address 2014-05-11 17:54:08 +02:00
Bernhard Posselt cb666c18d6 rename formatter to responder, formatResponse to buildResponse 2014-05-11 17:54:08 +02:00
Bernhard Posselt d8da79cab0 add test for not failing when adding more comments after type parameters, do not limit x-www-form-urlencoded to POST 2014-05-11 17:54:08 +02:00
Bernhard Posselt 80648da431 implement most of the basic stuff that was suggested in #8290 2014-05-11 17:54:08 +02:00
Bernhard Posselt a252f59cd4 Merge pull request #8504 from owncloud/cors-middleware
Add cors middleware
2014-05-11 16:54:34 +02:00
Lukas Reschke fd5b2d11d6 Rename issubdirectory to isSubDirectory 2014-05-11 15:50:59 +02:00
Bernhard Posselt 9a4d204b55 add cors middleware
remove methodannotationreader namespace

fix namespace for server container

fix tests

fail if with cors credentials header is set to true, implement a reusable preflighted cors method in the controller baseclass, make corsmiddleware private and register it for every request

remove uneeded  local in cors middleware registratio

dont uppercase cors to easily use it from routes

fix indention

comment fixes

explicitely set allow credentials header to false

dont depend on better controllers PR, fix that stuff later

split cors methods to be in a seperate controller for exposing apis

remove protected definitions from apicontroller since controller has it
2014-05-09 23:34:41 +02:00
Lukas Reschke 1083085e6e Merge pull request #7546 from owncloud/no_freaking_tag_dupes
Tags cleanup
2014-05-09 22:10:45 +02:00
Bart Visscher f569c721a6 Merge branch 'master' into optimize-startup-queries
Conflicts:
	apps/files_sharing/lib/sharedstorage.php
	tests/lib/group/manager.php

removed hasFilesSharedWith from lib/public/share.php and
sharedstorage.php to fix merge
2014-05-07 17:54:38 +02:00
Vincent Petry 75d81eefc1 Merge pull request #8223 from owncloud/fix_linkToPublic
Fix linkToPublic and linkToAbsolute.
2014-05-07 14:40:59 +02:00
Thomas Müller 45f8d2d3ff Merge pull request #8456 from owncloud/extstorage-unittestssuite
Added ext storage app in autotest unit test run
2014-05-05 19:48:35 +02:00
Vincent Petry 0c8ae6eb66 Added ext storage app in autotest unit test run
To make sure that the dynamic mount config and config classes from
external storages are tested, these are now added into the autotest.sh
test run by enabling the app.
2014-05-05 15:03:10 +02:00
Vincent Petry 1a454f61ed Merge pull request #8386 from owncloud/fix_6946_master
Fix 6946 master
2014-05-05 14:08:45 +02:00
Morris Jobke 623161b9a9 Merge pull request #8023 from flyser/master
Fix setting the max-upload-size for really large values.
2014-05-03 11:49:38 +02:00
Joas Schilling ced2a4fcf2 Remove unneccessary statement from test 2014-04-29 10:42:49 +02:00
Joas Schilling 39bf700790 Update tests to test for create and update aswell 2014-04-29 10:34:28 +02:00
Arthur Schiwon 837a02184b the group manager calls exists check less often, adjust test accordingly 2014-04-28 19:19:37 +02:00
Arthur Schiwon 45e42c25de Group Database backend must not gather user details itself but ask user
backends. This is a port to master from PR #7745

remove OC_GROUP_BACKEND_GET_DISPLAYNAME option for group backends

Conflicts:
	lib/private/group/backend.php

LDAP: getDisplayNamesInGroup is not an option for group backends anymore

Conflicts:
	apps/user_ldap/group_ldap.php
	apps/user_ldap/group_proxy.php

clean up group backends

Conflicts:
	lib/private/group/database.php

remove now unnecessary test

implement getDisplayNames in group manager

adjust user manager tests

test for group manager's displayNamesInGroup

trim must not be used in empty in PHP < 5.5

keep the constant to not provoke PHP warnings

Conflicts:
	lib/private/group/backend.php
2014-04-28 13:49:56 +02:00
Lukas Reschke 96c06c14d8 Merge pull request #8341 from owncloud/template-tests-output-buffering
Improve Template Tests by Removing Manual Output Buffering
2014-04-26 12:29:36 +02:00
Robin Appelman 4109521cce remove outdated test 2014-04-25 12:24:18 +02:00
Robin Appelman 6c20a014ea merge master into webdav-injection 2014-04-25 11:47:06 +02:00
Andreas Fischer 916b265cd5 Normalise testcleanuplistener.php indentation and end of file. 2014-04-24 16:42:28 +02:00
Andreas Fischer f45080e811 Use PHPUnit's expectOutputString() instead of performing output buffering. 2014-04-24 15:45:07 +02:00
Andreas Fischer 88778b569e Split testP() tests into multiple methods. 2014-04-24 15:36:02 +02:00
Andreas Fischer 0d3ddd9e11 Remove redundant test case for non-HTML string. 2014-04-24 15:34:09 +02:00
Andreas Fischer e85fe01faf Make PHPUnit_Framework_TestListener implementations compatible to 4.0. 2014-04-24 15:16:57 +02:00
Andreas Fischer f9091a8584 Merge pull request #8304 from owncloud/add-xss-tests
Add unit tests for arrays and quotationmark

* owncloud/add-xss-tests:
  Remove uneeded newline
  Fix indentation
  Add unit tests for arrays and "
2014-04-24 15:09:36 +02:00
Bjoern Schiessle 6650be9913 add setting to set default expire date 2014-04-24 13:34:31 +02:00
Bernhard Posselt 5199e4508a dont update entity and dont run an update query if an entity wasnt changed at all 2014-04-23 13:43:17 +02:00
Lukas Reschke 9d3b639ce6 Remove uneeded newline 2014-04-22 20:11:34 +02:00
Lukas Reschke 589c74e176 Fix indentation 2014-04-22 20:10:46 +02:00
Lukas Reschke f07180639c Add unit tests for arrays and "
OC_Util::sanitizeHTML() also supports array but we actually had no unit test for it. Additionally this commit introduces a test for escaping " into &quot;
2014-04-22 20:09:55 +02:00
Robin Appelman 3821a09689 merge master into webdav-injection 2014-04-22 12:25:49 +02:00
Bernhard Posselt 7e447f4f42 make download and redirectresponse public 2014-04-20 16:12:46 +02:00
Bernhard Posselt 309aa3bcd2 fix phpdoc for entities 2014-04-20 02:55:59 +02:00
Bernhard Posselt 4a7e0561ca move db into iservercontainer 2014-04-19 19:30:12 +02:00
Bernhard Posselt 0fe4db0992 remove unusued variable 2014-04-19 16:02:15 +02:00
Bernhard Posselt f4bc5ee863 remove unusued variable 2014-04-19 16:00:19 +02:00
Bernhard Posselt 93237d87ec fix scrutinizer issues 2014-04-19 15:25:36 +02:00
Bernhard Posselt f260951825 port database layer from appframework to core 2014-04-19 14:56:16 +02:00
Morris Jobke 5a1a056c6d Merge pull request #8183 from owncloud/move-security-headers
Move security headers
2014-04-16 23:46:20 +02:00
Thomas Tanghus df9d9ac958 Remove unused var 2014-04-16 14:34:13 +02:00
Thomas Tanghus dd36d4b894 Add tests for linkTo, linkToPublic, linkToRemote, linkToRemoteBase 2014-04-16 14:32:08 +02:00
Robin Appelman 295b75cca9 merge master into webdav-injection 2014-04-15 20:05:43 +02:00
Robin Appelman c82adb8c5d merge master into webdav-injection 2014-04-15 20:03:00 +02:00
Lukas Reschke ffab31e3ee Merge pull request #8197 from owncloud/secure_mimetypes
White-list known secure mime types. Refs. #8184
2014-04-15 19:50:33 +02:00
Arthur Schiwon 450de0091a adjust tests accordingly 2014-04-15 17:53:57 +02:00
Lukas Reschke 340089f270 Merge pull request #8059 from owncloud/countUsersInGroup
add optional countUsersInGroup method to group backends
2014-04-14 20:45:12 +02:00
Lukas Reschke 9046f7b2f8 Merge pull request #8178 from owncloud/fix-request-parameters
Correctly process request parameters other than GET or POST, dont use gl...
2014-04-14 20:42:26 +02:00
Thomas Tanghus 51e47319ef White-list known secure mime types. Refs. #8184 2014-04-14 17:17:50 +02:00
Thomas Müller 8df19c4379 Merge pull request #8019 from owncloud/thumbnail_fixes
Thumbnail fixes
2014-04-14 16:23:03 +02:00
Lukas Reschke b04d95b116 Remove uneeded usages of nosniff 2014-04-13 12:48:16 +02:00
Bernhard Posselt 62cce982bb default to GET request when no method is set to fix unittests, also set parsed json parameters on the post attribute 2014-04-12 16:17:49 +02:00
Vincent Petry e92fe47d2a Remove annoying karma 404 warnings for images
Karma now serves images from core to avoid polluting the logs with a lot
of 404 warnings.

This also makes it easier to read the test errors during development.
2014-04-11 15:25:40 +02:00
Thomas Müller 7325aefbd1 Merge pull request #8112 from owncloud/karma-enableautowatch
Enable autowatch for karma
2014-04-10 16:57:28 +02:00
Thomas Müller 26a89e369e Merge pull request #8137 from owncloud/routeing-requirements
add requirements to routing
2014-04-10 16:23:01 +02:00
Vincent Petry 6cc578d1a7 Merge pull request #8018 from owncloud/ocs_result_success_is_100
OC_OCS_Result Class, Only accept 100 code as success
2014-04-10 13:03:10 +02:00
Bernhard Posselt 70c88027db add requirements to routing 2014-04-09 21:57:32 +02:00
Thomas Müller 73ac3d0fcd Merge pull request #7643 from owncloud/chainable_response
Chainable Response in AppFramework
2014-04-08 22:42:43 +02:00
Vincent Petry bfb1e0867f Enable autowatch for karma
This way unit tests can be run in multiple browsers with the command
line and tests will re-run automatically when files are changed.
2014-04-08 17:21:11 +02:00
Thomas Müller a4fc92b05b class Test_Config is already declared 2014-04-08 14:15:33 +02:00
Arthur Schiwon 9597f41904 add group tests 2014-04-08 12:32:30 +02:00
Thomas Müller 240d1ae6b9 unit test testSetAppValueIfSetToNull() added 2014-04-07 20:56:43 +02:00
Fabian Henze 1245ff8f31 Add unit tests for OC_Helper::phpFileSize function 2014-04-07 15:31:34 +02:00
Thomas Müller ccf1287fbf adding unit test for cache mechanism 2014-04-04 16:21:50 +02:00
Thomas Müller f029312e5b fixing typos/spellings 2014-04-04 11:37:47 +02:00
Thomas Müller 20f26068e7 Merge pull request #7476 from owncloud/type-hinting
Type hinting
2014-04-03 20:02:27 +02:00
tomneedham b00592ade5 Fix test case for api response code 2014-04-03 14:47:55 +00:00
Thomas Müller a2efdb8722 Merge pull request #7970 from owncloud/webdav-upload-hash
Fix uploading files containing a # in the path for webdav
2014-04-03 16:09:44 +02:00
Vincent Petry 4cc70ec39d Merge pull request #7979 from owncloud/core-fixfilegetcontentsloop
Correctly read the full stream in file_get_contents
2014-04-02 10:55:50 +02:00
Thomas Müller 82d1ea240e Merge pull request #7884 from owncloud/use-idn_to_ascii-if-available
idn_to_ascii is only used if available
2014-04-01 22:51:23 +02:00
Vincent Petry d6ce45fe61 Correctly read the full stream in file_get_contents
When using user-defined stream wrappers, PHP will
return a maximum of 8192 bytes even if more was
requested.

This fix uses stream_get_contents to make sure the full stream is read
and not only the first 8 KB.

Added unit test with a bigger test file to cover this case.
2014-04-01 10:07:16 +02:00
Bart Visscher 6b061c236d Merge branch 'master' into type-hinting
Conflicts:
	lib/private/image.php
	lib/private/l10n.php
	lib/private/request.php
	lib/private/share/mailnotifications.php
	lib/private/template/base.php
2014-03-31 21:38:54 +02:00
Robin Appelman 76c63a5760 Fix uploading files containing a # in the path for webdav 2014-03-31 17:00:32 +02:00
Thomas Müller 70db348475 Merge pull request #7824 from owncloud/hash-parameter-order
Fix parameter order for Storage\Local::hash
2014-03-28 13:06:07 +01:00
Vincent Petry d0012e729a Merge pull request #7879 from owncloud/sharing_cleanup_public_api
sharing api cleanup, first step
2014-03-28 12:23:11 +01:00
Vincent Petry 5068c57845 Merge pull request #7613 from owncloud/fix_urlGenerator2
Add \OC::$WEBROOT to URLGenerator::getAbsoluteURL()
2014-03-28 12:12:49 +01:00
Vincent Petry 040f430f0c Merge pull request #7829 from owncloud/cachefolderlocation
Cache folder is now configurable
2014-03-28 12:08:38 +01:00
Vincent Petry ef2c176eef Merge pull request #7678 from owncloud/test-bootstrap-fileproxy-cleanup
Cleanup the fileproxy proxies on test bootstrap
2014-03-28 11:33:57 +01:00
Robin Appelman 371a924c92 merge master into webdav-injection 2014-03-26 14:26:07 +01:00
Thomas Müller 83b4bcfdbf idn_to_ascii is only used if available 2014-03-26 11:17:23 +01:00
Thomas Müller 1ae10b9da3 Merge pull request #7420 from owncloud/cachehooks-first
Manually triger the filecache update hooks before any other hook
2014-03-25 22:41:09 +01:00
Thomas Müller bbc2e37259 Merge pull request #7477 from owncloud/foldersize-reuse
Allow re-using already known fileinfo when calculating folder sizes
2014-03-25 22:33:24 +01:00
Bjoern Schiessle bc0292c16d always return an array 2014-03-25 17:47:24 +01:00
Thomas Müller 531c9564b3 Merge pull request #7861 from owncloud/idn-domains-support-on-emails-master
idn have to be converted before being used
2014-03-25 12:38:32 +01:00
Vincent Petry 1e39719926 Added unit tests for external cache folder 2014-03-24 14:32:04 +01:00
Thomas Müller fb7f3008d3 idn have to be converted before being used 2014-03-24 13:46:31 +01:00
icewind1991 4c8a83e82f Merge pull request #7714 from owncloud/phpunit-config
Allow setting the config dir to use as enviroment variable for phpunit
2014-03-24 13:01:37 +01:00
Robin Appelman fffe330bbc Fix parameter order for Storage\Local::hash 2014-03-20 15:32:12 +01:00
Vincent Petry 316a22b463 Merge pull request #7808 from owncloud/quota-usequotaevenwhenfreespaceunknown
Still return quota value when free space is unknown
2014-03-20 15:29:14 +01:00
Vincent Petry 36c0f08ec0 Merge pull request #7732 from owncloud/datafolderexistence
Added .ocdata file to check for data folder validity
2014-03-20 11:31:28 +01:00
Vincent Petry 66bc0f0848 Still return quota value when free space is unknown
Fixed the quota storage wrapper to correctly return the quota value when
the free space is not known (which usually happens when the disk_free_space
function is disabled)
2014-03-19 19:07:11 +01:00
Thomas Müller 153eadd753 Merge branch 'master' into close-session-faster-master 2014-03-17 21:57:48 +01:00
Thomas Müller 6bbbf8536f introduce reopen() method to be used for unit test execution only - right after a unit test has been executed the session will be reopened 2014-03-17 21:57:10 +01:00
Thomas Müller 756bbe8786 Merge pull request #7649 from owncloud/routing-public
Move routing classes to an interface and expose it in the public api
2014-03-17 21:07:05 +01:00
icewind1991 5c72b526a3 Merge pull request #7760 from owncloud/core-roundbytes
Correctly round bytes when converted from human readable format
2014-03-17 15:21:57 +01:00
Vincent Petry 145db370d1 Correctly round bytes when converted from human readable format
Instead of leave two decimal places which is confusing, round the byte
values correctly to the closest byte.
2014-03-17 12:15:12 +01:00
Thomas Müller cd038604d3 unit tests for specific image type output added 2014-03-17 08:40:59 +01:00
Thomas Müller fe05c0c81b move session reset to endTest() - necessary because we need a valid session in the next unit tests setUp() call 2014-03-14 18:16:20 +01:00