Bug 279112 - Accounts KCM should enforce avatar size restrictions
Summary: Accounts KCM should enforce avatar size restrictions
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: accounts-kcm (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR minor
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 23:59 UTC by Tony McCourin
Modified: 2013-06-10 09:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.7.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony McCourin 2011-08-01 23:59:10 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

KDE Telepathy contact list does not enforce avatar constraints e.g. allows for a REALLY big image to be set as avatar. This leads to e.g. current version of Gabble disconnecting shortly after connecting.

Reproducible: Always

Steps to Reproduce:
Set a really BIG image as avatar

Actual Results:  
All XMPP accounts disconnect (partly due to the bug in Gabble)

Expected Results:  
Too big an avatar should not be set

As it has already been discussed on IRC, this problem is as much KDE Telepathy's fault (not checking for avatar size) as it is Telepathy Gabble's fault (not enforcing avatar size). The problem should be fixed on both ends.
Comment 1 David Edmundson 2011-08-02 00:01:30 UTC
Relevant: http://telepathy.freedesktop.org/doc/telepathy-qt4/a00050.html
Comment 2 David Edmundson 2012-01-10 13:31:04 UTC
This is now in the accounts-KCM. moving bug.
Comment 3 Daniele E. Domenichelli 2012-01-16 18:58:04 UTC
Did anyone report a bug upstream about this?
Gabble should not crash even if he cannot handle the large image...
Anyway I cannot reproduce the bug, how "big" is your picture?
Comment 4 Daniel Vrátil 2013-06-10 09:57:01 UTC
Git commit aa2beddbfa05ed68af71f3ccbf0685e622670da7 by Dan Vrátil.
Committed on 10/06/2013 at 11:56.
Pushed by dvratil into branch 'master'.

Add UI to enforce avatar size restrictions

Add code to Accounts KCM that will allow users to crop avatar and will
scale it down to maximum size allowed by server (or to some reasonable
values if server/gabble does not report avatarRequirements())

REVIEW: 110929
FIXED-IN: 0.7.0

M  +0    -1    src/CMakeLists.txt
M  +1    -0    src/account-identity-dialog.cpp
M  +115  -24   src/avatar-button.cpp
M  +6    -1    src/avatar-button.h
D  +0    -113  src/fetch-avatar-job.cpp
D  +0    -51   src/fetch-avatar-job.h
M  +1    -0    src/kcm-telepathy-accounts.cpp

http://commits.kde.org/telepathy-accounts-kcm/aa2beddbfa05ed68af71f3ccbf0685e622670da7