-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Photo hash comparison is case sensitive #454
Comments
dereck009
changed the title
Bug: Photo hash comparison is case sensitive (ejabberd)
Bug: Photo hash comparison is case sensitive
Oct 22, 2014
The comparison: https://github.com/robbiehanson/XMPPFramework/blob/master/Extensions/XEP-0153/XMPPvCardAvatarModule.m#L237 ...should look like this:
Note: I also used the |
andrewchae
pushed a commit
to andrewchae/XMPPFramework
that referenced
this issue
Feb 6, 2015
* master: (82 commits) Most of the project (excluding the vendor dirs) should now be updated to modern syntax. Resolves issue robbiehanson#449. More updates to modern syntax Updated gitignore to include .idea dir and began refactoring the codebase to use modern syntax Updated XEP-0077 based on conversations at the original PR. No longer using childCount == 0 as validation. Fixes allowRosterlessOperation Deadlock Universal Roster Item API Add support for NSSecureCoding Merges robbiehanson#461 Bulletproofing the file transfer extensions Updated log levels Added XMPPNamespaces Added FileTransfer extension Fixes robbiehanson#454 Fixes robbiehanson#450 Added documentation Added XMPPRegistration to handle XEP-0077 Updated XMPPMUC to include functionality for discovering rooms and services Fixes robbiehanson#395 Fixes robbiehanson#421 Fixing many bugs in XMPPStreamManagement. ...
Closed
davidchiles
pushed a commit
to davidchiles/XMPPFramework
that referenced
this issue
Jan 26, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have an ejabberd installation which sends photo hashes with letters in all uppercase.
The vCardTempCoreDataStorageObject calculates its own hash from the data with letters in all lowercase.
https://github.com/robbiehanson/XMPPFramework/blob/master/Extensions/XEP-0054/CoreDataStorage/XMPPvCardCoreDataStorageObject.m#L135
Then the vCardAvatarModule uses case sensitive
isEqualToString
comparison:https://github.com/robbiehanson/XMPPFramework/blob/master/Extensions/XEP-0153/XMPPvCardAvatarModule.m#L237
This results in the photo always being fetched from the server.
Suggestion: use the
caseInsensitiveCompare
string method to compare hashes!The text was updated successfully, but these errors were encountered: