summaryrefslogtreecommitdiffstats
path: root/core/Controller/AvatarController.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(core): Limit valid avatar sizesprovokateurin2024-08-141-4/+4
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(core): Replace security annotations with respective attributesprovokateurin2024-07-261-17/+11
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor: Migrate some legacy and core functions to `IFilenameValidator`Ferdinand Thiessen2024-07-191-2/+1
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(core): Return X-NC-IsCustomAvatar for guest avatars tooprovokateurin2024-06-121-2/+4
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(files_sharing): dark avatar supportskjnldsv2024-06-121-5/+5
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* fix(core): allow guest avatar fallbackskjnldsv2024-06-121-2/+12
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* chore: Add SPDX headerAndy Scherzinger2024-05-271-28/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* refactor(core): Switch to attribute based routingprovokateurin2024-02-211-0/+7
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* core: Add OpenAPI specjld31032023-07-131-2/+17
| | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* Applies agreed-upon indentation convention to the changed controllers.Faraz Samapoor2023-06-051-10/+12
| | | | | | Based on https://github.com/nextcloud/server/pull/38636#discussion_r1218167753 Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* Refactors controllers by using PHP8's constructor property promotion.Faraz Samapoor2023-06-041-54/+34
| | | | Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* composer run cs:fixCôme Chilliet2023-01-201-8/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update avatars on updateCarl Schwan2022-09-091-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Avatar new styleCarl Schwan2022-09-091-1/+39
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Remake profile picture saving with VueChristopher Ng2022-09-021-0/+13
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Use Image class from public APIChristopher Ng2022-06-021-3/+3
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Update core to PHP 7.4 standardCarl Schwan2022-05-201-49/+21
| | | | | | | - Typed properties - Port to LoggerInterface Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix caching of the user avatarCarl Schwan2022-02-251-1/+1
| | | | | | | | | | Now on firefox/safari it is only refetched once a day. On Chrom{e,ium} we keep the previous behavior of maybe refetching it more often. This also notify the user about this behavior when they upload an avatar picture. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Only allow avatars in 64 and 512 pixel sizeJoas Schilling2022-02-071-4/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix errors in AvatarController when data() returns nullCôme Chilliet2021-11-231-2/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* show informative errors in log and UI on avatar upload error in user settingsJulien Veyssier2021-04-011-1/+13
| | | | Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unused members and importsJoas Schilling2020-09-081-6/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* The privacy setting is only about syncing to other serversJoas Schilling2020-09-031-15/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Cache the avatar for a dayRoeland Jago Douma2020-05-121-2/+2
| | | | | | | | I noticed that on larger systems esp when using talk the avatars get revalidated like crazy. Because people keep the tab open etc. You can do with a slightly outdated avatar! Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix multiline commentsChristoph Wurst2020-04-081-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #19723 from nextcloud/bug/18603/avatar-responseRoeland Jago Douma2020-03-031-2/+2
|\ | | | | Always use status 200 for avatar response
| * Always use status 200 for avatar responseDaniel Kesselberg2020-03-011-2/+2
| | | | | | | | | | | | 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>
* | Also cache avatars when it's not allowedJoas Schilling2020-02-281-4/+6
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headersChristoph Wurst2019-12-051-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #17715 from nextcloud/fix/5456/respect_avatar_privacyJoas Schilling2019-12-041-16/+20
|\ | | | | Honor avatar visibility settings
| * Update testsRoeland Jago Douma2019-11-131-21/+3
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
| * Honor avatar visibility settingsRoeland Jago Douma2019-10-281-4/+26
| | | | | | | | | | | | | | | | | | 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>
* | Some php-cs fixesRoeland Jago Douma2019-11-221-1/+2
|/ | | | | | | | | | | * 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>
* Implement guest avatar endpointMichael Weimann2019-02-071-1/+0
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Make the info available if the avatar was uploaded or generatedJoas Schilling2018-08-011-5/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Removed debug stackJohn Molakvoæ (skjnldsv)2018-06-151-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Avatar imagick bumpJohn Molakvoæ (skjnldsv)2018-06-131-48/+14
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Controller tests fixesJohn Molakvoæ (skjnldsv)2018-06-131-6/+16
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Return Svg avatarsJohn Molakvoæ (skjnldsv)2018-06-131-9/+37
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix usageRoeland Jago Douma2018-06-041-8/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove unused import statementsMorris Jobke2018-02-141-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Improve OC_Image code to not guess the type of input, but actually request ↵Morris Jobke2018-01-181-2/+4
| | | | | | | | the specific methods to be called Followup to #7836 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Move avatar code to Avatar ClassRoeland Jago Douma2017-11-291-159/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Always generate avatarRoeland Jago Douma2017-11-291-5/+155
| | | | | | | | 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>