summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-10-01 11:09:13 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-10-01 11:09:13 (GMT)
commit6a4a15088e7c97b3f6c1de179eee1defa2720bdb (patch)
tree56a994e5f7eddcc38cf24d6af24f8c28076c537a /Swiften/Roster/RosterPushResponder.h
parenteedd35c220d6c8788c8ae4921135333a57feb3a0 (diff)
downloadswift-6a4a15088e7c97b3f6c1de179eee1defa2720bdb.zip
swift-6a4a15088e7c97b3f6c1de179eee1defa2720bdb.tar.bz2
Fixed roster sender check.swift-1.x
Resolves: #993
Diffstat (limited to 'Swiften/Roster/RosterPushResponder.h')
-rw-r--r--Swiften/Roster/RosterPushResponder.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Swiften/Roster/RosterPushResponder.h b/Swiften/Roster/RosterPushResponder.h
index b38914b..4e0bc4e 100644
--- a/Swiften/Roster/RosterPushResponder.h
+++ b/Swiften/Roster/RosterPushResponder.h
@@ -21,8 +21,13 @@ namespace Swift {
private:
virtual bool handleSetRequest(const JID& from, const JID&, const std::string& id, boost::shared_ptr<RosterPayload> payload) {
- onRosterReceived(payload);
- sendResponse(from, id, boost::shared_ptr<RosterPayload>());
+ if (getIQRouter()->isAccountJID(from)) {
+ onRosterReceived(payload);
+ sendResponse(from, id, boost::shared_ptr<RosterPayload>());
+ }
+ else {
+ sendError(from, id, ErrorPayload::NotAuthorized, ErrorPayload::Cancel);
+ }
return true;
}
};