Commit Graph

145 Commits

Author SHA1 Message Date
Arthur Schiwon 002e1f1ed2
available since 19.0.1
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-06-22 13:43:18 +02:00
Roeland Jago Douma c21a976bc4 Allow to specify the cookie type for appframework responses
In general it is good to set them to Lax. But also to give devs more
control over them is not a bad thing.

Helps with #21474

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-06-22 11:02:50 +00:00
Roeland Jago Douma b9cb5a74cc Copy over the ETag and LastModified when formatting a Dataresponse
This way the ETag checks etc are all working.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-19 12:51:06 +00:00
Clement Wong 203d85f045 Add public argument to Http cacheFor()
Signed-off-by: Clement Wong <git@clement.hk>
2020-05-13 06:34:22 +00:00
Clement Wong 1331eb1fb8 Proxy server could cache http response when it is not private
Signed-off-by: Clement Wong <git@clement.hk>
2020-05-13 06:34:22 +00:00
Daniel Kesselberg cba7219b25
PHP 7.4 excludes the arguments from stack traces by default.
That leads to a false positive is not setup via query() but directly warning for every app because
the check does not work anymore.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-04-30 17:00:56 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Joas Schilling 3f8168b6e5
Allow some apps to have root URLs in their own routing file
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-18 11:21:28 +02:00
Christoph Wurst 28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst 85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +02:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst 463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
Remove unused imports
2020-03-27 17:14:08 +01:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Pavel Krasikov 4c01326913 add docs for useJsNonce
Signed-off-by: Pavel Krasikov <klonishe@gmail.com>
2020-03-15 17:02:11 +03:00
Joas Schilling 9c9f8fa5f7
Allow non integer ids in Entity Mapper
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-26 14:44:45 +01:00
TimObert 4c1834dace Fix requested changes
Signed-off-by: Tim Obert <tobert@w-commerce.de>
2020-02-14 14:16:31 +01:00
Tim Obert 058180d386 Change the route generation of AuthPublicShareController.php and adjust the routes for file sharing
Signed-off-by: Tim Obert <tobert@w-commerce.de>
2020-02-14 12:12:04 +01:00
Christoph Wurst 6127c288e8 Fix license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-13 14:23:49 +01:00
Daniel Calviño Sánchez 883a71ce8e Split the menu entry for external shares in two
The external shares entry showed a "button" that, when pressed, replaced
the button with the input to set the remote share address. The "button"
was actually a label for the input, so when the label was focused it
transferred the focus to the input and thus pressing enter or space did
not show the input. Moreover, inputs inside links are not valid HTML,
and once shown there was no way to hide the input again.

Due to all this, and for consistency with the direct link input, the
external share input was moved to a different menu item that is shown
and hidden when the button, which nows is also a real button, is
clicked.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-12-30 10:29:36 +01:00
Daniel Calviño Sánchez 33b2f4e295 Format HTML elements
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-12-30 10:29:36 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma b607e3e6f4
Merge pull request #17948 from nextcloud/enh/check-if-property-is-bool
Make isXXX available for bool properties only
2019-11-26 12:25:36 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Daniel Kesselberg a27c10daa6
Make isXXX available for bool properties only
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-11-16 00:39:48 +01:00
Julius Härtl 3c09299346
Do not throw an exception for base App class
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-08 11:41:42 +01:00
Robin Appelman 5ca27085fc
mark getAppContainer as a valid way to construct app containers
this is triggerd (and not cought by the query arm) if an item from an app is queried before the app queries it's own Application instance

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-04 19:40:08 +01:00
Roeland Jago Douma 380563fd53
Merge pull request #17562 from nextcloud/techdebt/17509/log-error-when-setting-up-application-incorrectly
Log an error in development cases when the application class was set …
2019-10-29 21:09:26 +01:00
Christoph Wurst ce9a434fb2
Add isXXX getter to Entity
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-10-22 14:54:21 +02:00
Joas Schilling aad535e3af
Log an error in development cases when the application class was set up incorrectly
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-10-16 12:17:09 +02:00
Roeland Jago Douma a85f2f4165
set default CSP on NotFoundResponse
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-09-09 22:37:12 +02:00
Roeland Jago Douma def82c5077
Remove reflect method form public interface
The reflect method is (and should) only every be called internally.
Since if you call it again it would otherwise start mixing and matching
arguments etc.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-30 13:28:18 +02:00
Roeland Jago Douma 35db32f504
Add deprecation warning
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-29 14:52:50 +02:00
Roeland Jago Douma c40fe8b819
Do not enforce the parent constructor of response to be called
If there is no policy set we just take the default empty ones.
That way no obscure errors get thrown if the constructor is not called.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-19 14:39:34 +02:00
Roeland Jago Douma c4cafae884
frame-src doesn't respect the nonce attribute
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-16 21:29:57 +02:00
Roeland Jago Douma b8c5008acf
Add feature policy header
This adds the events and the classes to modify the feature policy.
It also adds a default restricted feature policy.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-10 14:26:22 +02:00
Roeland Jago Douma f94ee72507
Add form-action CSP element
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-07-31 15:16:10 +02:00
Roeland Jago Douma cd243b0876
No need to have these classes we tighten the default CSP from time to
time

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-07-27 14:59:48 +02:00
Roeland Jago Douma 96e51b5f6f
Redirect to the right token on public shares
If the token doesn't match (or isn't set) during the redirect. We should
properly set it. Else we might redirect to a later auth display that set
these values.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-05-23 13:49:04 +02:00
Roeland Jago Douma 7276735eb4
Set empty CSP by default
For #14179

By default responses should have the strictest (and simplest) CSP
possible. Only template responses should require an actual CSP.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-04-16 14:09:39 +02:00
Marius David Wieschollek 5aeb8eac2b
[#11236] Set parameter type in QBMapper
Signed-off-by: Marius David Wieschollek <git.public@mdns.eu>
2019-03-24 22:43:45 +01:00
Roeland Jago Douma 4d8e1f6c67
CSP: set nonce for iframes
This for now uses the jsNonce. That way we can easily backport it.
For 17 I will fix it properly.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-03-16 20:20:03 +01:00
Joas Schilling c5ab74348c
Avoid duplicate App container creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-05 17:55:35 +01:00
Joas Schilling 3203d3e806
Allow apps to redirect to the default app
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-01 09:19:46 +01:00