Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Daniel Kesselberg
68148f4073
Always use status 200 for avatar response
As discussed in #18603 caching a 201 response is hard. It's now possible to distinguish between generated and uploaded avatars by reading the X-NC-IsCustomAvatar (0 = generated, 1 = uploaded) header.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
6 years ago
Joas Schilling
a92ab77747
Also cache avatars when it's not allowed
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
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>
6 years ago
Roeland Jago Douma
54eb27dab2
Update tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
0bd1378f81
Honor avatar visibility settings
Fixes #5456
Only when an avatar is set to public should we show it to the public.
For now this has an open question as to how to solve federated avatars.
But I assume a dedicated paramter or endpooint would make sense there.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Michael Weimann
bf1253cb49
Implement guest avatar endpoint
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
7 years ago
Joas Schilling
decd196162
Make the info available if the avatar was uploaded or generated
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
John Molakvoæ (skjnldsv)
543188d0cb
Removed debug stack
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
John Molakvoæ (skjnldsv)
156da29cea
Avatar imagick bump
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
John Molakvoæ (skjnldsv)
eea6f74ca4
Controller tests fixes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
John Molakvoæ (skjnldsv)
adf3856d35
Return Svg avatars
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
Roeland Jago Douma
e5cc8be9d5
Fix usage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years ago
Morris Jobke
d3d045dd5c
Remove unused import statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
3d4c698f44
Improve OC_Image code to not guess the type of input, but actually request the specific methods to be called
Followup to #7836
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Roeland Jago Douma
ba648eecdf
Move avatar code to Avatar Class
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years ago
Roeland Jago Douma
604596ec16
Always generate avatar
Even if no avatar is set we should just generate the image. This to not
duplicate the code on all the clients. And only server images from the
avtar endpoint.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years ago
Morris Jobke
0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Lukas Reschke
8ad17a66d6
Exclude avatar from Same-Site Cookie requirement
Required to work with the upcoming Collabora avatar integration.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
8 years ago
Joas Schilling
0aff1c9268
Return the user id in case of an error
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
Roeland Jago Douma
aa6d8fcdbf
Fix AvatarController
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
9 years ago
Roeland Jago Douma
5c602f3217
Cache all avatar responses
* Cache for 30 minutes
* Also cache when avatar can't be found
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
9 years ago
Roeland Jago Douma
b05fe45d52
Fix avatar on exif rotated images
Fixes #1928
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
9 years ago
Joas Schilling
656e3f7a24
Check the mimetype before reading the content and catch exception
Signed-off-by: Joas Schilling <coding@schilljs.com>
10 years ago
Roeland Jago Douma
6740c627b8
Move AvatarController over to FileDisplayResponse
10 years ago
Roeland Jago Douma
14136295b7
Cache avatars properly
* Set proper caching headers for avatars (15 minutes)
* For our own avatar use some extra logic to invalidate when we update
10 years ago
Roeland Jago Douma
b1a090f357
AvatarController use proper JSONResponse
* Do not rely on DataResponse magic. We want JSON so use JSON
* Fix tests
10 years ago
Roeland Jago Douma
2f03853fb9
AvatarController cleanup
* Use all DI components
* Let the AppFramework resolve the AvatarController
* Update unit tests
* Unit tests no longer require DB
10 years ago
Roeland Jago Douma
0cb8f74cd1
Delete IE8 support in the avatar controller
10 years ago
Joas Schilling
0215b004da
Update with robin
10 years ago
Joas Schilling
ba87db3fcc
Fix others
10 years ago
Lukas Reschke
5fdde426eb
Add fancy layout
10 years ago
Lukas Reschke
aba539703c
Update license headers
10 years ago
Lukas Reschke
a4b19a5b1e
Rename files to be PSR-4 compliant
10 years ago
Morris Jobke
b97fe97875
move avatar controller to core/controller
10 years ago
Thomas Müller
682821c71e
Happy new year!
10 years ago
Roeland Jago Douma
186e35d954
Verify the path is a file on avatar update
Fixes #21533
Before we just assumed that the passed path was a file. This does not
have to be the case. Thus check if it actually is a file before doing
any more tests.
10 years ago
Roeland Jago Douma
3e80f14269
[Avatar] Make the avatar controller use the avatar node
10 years ago
Lukas Reschke
8f09d5b67c
Update license headers
10 years ago
Lukas Reschke
abdbf10ebc
Do not print exception message
In case of an error the error message often contains sensitive data such as the full path which potentially leads to a full path disclosure.
Thus the error message should not directly get displayed to the user and instead be logged.
10 years ago
Vincent Petry
14591d9df7
Use injected request
10 years ago
Morris Jobke
bf579a153f
fix IE8 user agent detection
10 years ago
Vincent Petry
c7aef6c368
Fix uploading avatar and root certs in IE8
11 years ago
Morris Jobke
b945d71384
update licence headers via script
10 years ago
Thomas Müller
a446b43bcc
Revert "Allow Remote avatars"
10 years ago
Roeland Jago Douma
ae62537adf
Allow remote avatars
11 years ago
Lukas Reschke
84d1e36ff9
Remove requesttoken for avatars
First step for https://github.com/owncloud/core/issues/11915
11 years ago