Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6580)

Unified Diff: chrome/browser/sync/notifier/cache_invalidation_packet_handler.cc

Issue 6392014: [Sync] Relax checks for received XMPP messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed sanjeev's comments Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | jingle/notifier/listener/listen_task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/notifier/cache_invalidation_packet_handler.cc
diff --git a/chrome/browser/sync/notifier/cache_invalidation_packet_handler.cc b/chrome/browser/sync/notifier/cache_invalidation_packet_handler.cc
index be46ecadf6a045b9c388e4b594de0210e1b21a9e..7fec7f4932df6299c1b58de4991418308db80f63 100644
--- a/chrome/browser/sync/notifier/cache_invalidation_packet_handler.cc
+++ b/chrome/browser/sync/notifier/cache_invalidation_packet_handler.cc
@@ -84,15 +84,9 @@ class CacheInvalidationListenTask : public buzz::XmppTask {
private:
bool IsValidCacheInvalidationIqPacket(const buzz::XmlElement* stanza) {
- // We make sure to compare jids (which are normalized) instead of
- // just strings -- server may use non-normalized jids in
- // attributes.
- //
- // TODO(akalin): Add unit tests for this.
- buzz::Jid to(stanza->Attr(buzz::QN_TO));
- return
- (MatchRequestIq(stanza, buzz::STR_SET, kQnData) &&
- (to == GetClient()->jid()));
+ // We deliberately minimize the verification we do here: see
+ // http://crbug.com/71285 .
+ return MatchRequestIq(stanza, buzz::STR_SET, kQnData);
}
bool GetCacheInvalidationIqPacketData(const buzz::XmlElement* stanza,
« no previous file with comments | « no previous file | jingle/notifier/listener/listen_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698