Changeset - f5e0acc528a8
[Not reviewed]
0 1 0
HanzZ - 12 years ago 2013-01-27 14:15:55
hanzz.k@gmail.com
Send non-escaped JID in gateway responder if jid_escaping is disabled
1 file changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/gatewayresponder.cpp
Show inline comments
 
@@ -52,7 +52,14 @@ bool GatewayResponder::handleGetRequest(const Swift::JID& from, const Swift::JID
 

	
 
bool GatewayResponder::handleSetRequest(const Swift::JID& from, const Swift::JID& to, const std::string& id, boost::shared_ptr<Swift::GatewayPayload> payload) {
 
	std::string prompt = payload->getPrompt();
 

	
 
	std::string escaped = Swift::JID::getEscapedNode(prompt);
 
	if (!CONFIG_BOOL_DEFAULTED(m_userManager->getComponent()->getConfig(), "service.jid_escaping", true)) {
 
		escaped = prompt;
 
		if (escaped.find_last_of("@") != std::string::npos) {
 
			escaped.replace(escaped.find_last_of("@"), 1, "%");
 
		}
 
	}
 
	// This code is here to workaround Gajim (and probably other clients bug too) bug
 
	// https://trac.gajim.org/ticket/7277
 
	if (prompt.find("\\40") != std::string::npos) {
0 comments (0 inline, 0 general)