{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/17232","labels_url":"https://api.github.com/repos/owncloud/core/issues/17232/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/17232/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/17232/events","html_url":"https://github.com/owncloud/core/issues/17232","id":91802694,"number":17232,"title":"LDAP - avatar in format other than jpg/png throws exception","user":{"login":"11mariom","id":552506,"avatar_url":"https://avatars.githubusercontent.com/u/552506?v=3","gravatar_id":"","url":"https://api.github.com/users/11mariom","html_url":"https://github.com/11mariom","followers_url":"https://api.github.com/users/11mariom/followers","following_url":"https://api.github.com/users/11mariom/following{/other_user}","gists_url":"https://api.github.com/users/11mariom/gists{/gist_id}","starred_url":"https://api.github.com/users/11mariom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/11mariom/subscriptions","organizations_url":"https://api.github.com/users/11mariom/orgs","repos_url":"https://api.github.com/users/11mariom/repos","events_url":"https://api.github.com/users/11mariom/events{/privacy}","received_events_url":"https://api.github.com/users/11mariom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/3%20-%20To%20Review","name":"3 - To Review","color":"ededed"},{"url":"https://api.github.com/repos/owncloud/core/labels/app:user_ldap","name":"app:user_ldap","color":"02d7e1"},{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/44","html_url":"https://github.com/owncloud/core/milestones/8.0.6-current-maintenance","labels_url":"https://api.github.com/repos/owncloud/core/milestones/44/labels","id":1160188,"number":44,"title":"8.0.6-current-maintenance","description":"","creator":{"login":"cmonteroluque","id":879976,"avatar_url":"https://avatars.githubusercontent.com/u/879976?v=3","gravatar_id":"","url":"https://api.github.com/users/cmonteroluque","html_url":"https://github.com/cmonteroluque","followers_url":"https://api.github.com/users/cmonteroluque/followers","following_url":"https://api.github.com/users/cmonteroluque/following{/other_user}","gists_url":"https://api.github.com/users/cmonteroluque/gists{/gist_id}","starred_url":"https://api.github.com/users/cmonteroluque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmonteroluque/subscriptions","organizations_url":"https://api.github.com/users/cmonteroluque/orgs","repos_url":"https://api.github.com/users/cmonteroluque/repos","events_url":"https://api.github.com/users/cmonteroluque/events{/privacy}","received_events_url":"https://api.github.com/users/cmonteroluque/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":16,"state":"open","created_at":"2015-06-11T12:21:16Z","updated_at":"2015-07-20T13:00:06Z","due_on":"2015-08-04T04:00:00Z","closed_at":null},"comments":3,"created_at":"2015-06-29T13:24:34Z","updated_at":"2015-07-20T13:05:42Z","closed_at":null,"body":"Hi,\r\nwhen using LDAP with OwnCloud lib/private/avatar.php ( https://github.com/owncloud/core/blob/master/lib/private/avatar.php#L104 ) could make instance unusable for some users. If they have avatar in other format than jpg or png - they have 500 internal server error, in logs you just see exception from avatar.php.\r\n\r\nException:\r\n```javascript\r\n{\"Message\":\"Unknown filetype\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/html\\/owncloud\\/apps\\/user_ldap\\/lib\\/user\\/user.php(346): OC_Avatar->set(Object(OCP\\\\Image))\\n#1 \\/var\\/www\\/html\\/owncloud\\/apps\\/user_ldap\\/lib\\/user\\/user.php(319): OCA\\\\user_ldap\\\\lib\\\\user\\\\User->setOwnCloudAvatar()\\n#2 \\/var\\/www\\/html\\/owncloud\\/apps\\/user_ldap\\/lib\\/user\\/user.php(134): OCA\\\\user_ldap\\\\lib\\\\user\\\\User->updateAvatar()\\n#3 \\/var\\/www\\/html\\/owncloud\\/apps\\/user_ldap\\/user_ldap.php(213): OCA\\\\user_ldap\\\\lib\\\\user\\\\User->update()\\n#4 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/user\\/manager.php(113): OCA\\\\user_ldap\\\\USER_LDAP->userExists('user')\\n#5 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/user\\/manager.php(142): OC\\\\User\\\\Manager->get('user')\\n#6 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/user.php(574): OC\\\\User\\\\Manager->userExists('user')\\n#7 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/user.php(334): OC_User::userExists('user')\\n#8 \\/var\\/www\\/html\\/owncloud\\/lib\\/base.php(774): OC_User::isLoggedIn()\\n#9 \\/var\\/www\\/html\\/owncloud\\/index.php(36): OC::handleRequest()\\n#10 {main}\",\"File\":\"\\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/avatar.php\",\"Line\":66} \r\n```\r\n\r\nSteps to reproduce:\r\n1. Use LDAP\r\n2. Create user in LDAP with f.e. gif avatar.\r\n3. Try to login to OwnCloud\r\n\r\nor\r\n1. Use LDAP\r\n2. Create user in LDAP\r\n3. Login to OwnCloud with that user\r\n4. Set in LDAP gif avatar\r\n5. Every link user opens - will give 500 Internal server error.\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/122877335","html_url":"https://github.com/owncloud/core/issues/17232#issuecomment-122877335","issue_url":"https://api.github.com/repos/owncloud/core/issues/17232","id":122877335,"user":{"login":"DeepDiver1975","id":1005065,"avatar_url":"https://avatars.githubusercontent.com/u/1005065?v=3","gravatar_id":"","url":"https://api.github.com/users/DeepDiver1975","html_url":"https://github.com/DeepDiver1975","followers_url":"https://api.github.com/users/DeepDiver1975/followers","following_url":"https://api.github.com/users/DeepDiver1975/following{/other_user}","gists_url":"https://api.github.com/users/DeepDiver1975/gists{/gist_id}","starred_url":"https://api.github.com/users/DeepDiver1975/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeepDiver1975/subscriptions","organizations_url":"https://api.github.com/users/DeepDiver1975/orgs","repos_url":"https://api.github.com/users/DeepDiver1975/repos","events_url":"https://api.github.com/users/DeepDiver1975/events{/privacy}","received_events_url":"https://api.github.com/users/DeepDiver1975/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T13:05:41Z","updated_at":"2015-07-20T13:05:41Z","body":"#17464 is still under review to be merged into master - no backport yet available -> 8.0.7"}}