Changeset - 9391c487b518
[Not reviewed]
0 3 0
Jan Kaluza - 9 years ago 2016-02-19 09:16:08
jkaluza@redhat.com
Web interface: Allow registering with no password
3 files changed with 11 insertions and 4 deletions:
0 comments (0 inline, 0 general)
libtransport/AdminInterface.cpp
Show inline comments
 
@@ -268,11 +268,16 @@ void AdminInterface::handleQuery(Swift::Message::ref message) {
 
		std::string body = msg;
 
		std::vector<std::string> args;
 
		boost::split(args, body, boost::is_any_of(" "));
 
		if (args.size() == 4) {
 
		if (args.size() == 4 || args.size() == 3) {
 
			UserInfo res;
 
			res.jid = args[1];
 
			res.uin = args[2];
 
			res.password = args[3];
 
			if (args.size() == 3) {
 
				res.password = args[3];
 
			}
 
			else {
 
				res.password = args[4];
 
			}
 
			res.language = "en";
 
			res.encoding = "utf-8";
 
			res.vip = 0;
spectrum/src/frontends/slack/SlackUserRegistration.cpp
Show inline comments
 
@@ -147,9 +147,11 @@ std::string SlackUserRegistration::handleOAuth2Code(const std::string &code, con
 
	std::string slackChannel;
 
	std::string uin;
 
	std::string password;
 
	if (data.size() == 4) {
 
	if (data.size() >= 3) {
 
		slackChannel = data[1];
 
		uin = data[2];
 
	}
 
	if (data.size() == 4) {
 
		password = data[3];
 
	}
 

	
spectrum_manager/src/APIServer.cpp
Show inline comments
 
@@ -256,7 +256,7 @@ void APIServer::serve_instances_register(Server *server, Server::session *sessio
 
	std::string uin = get_http_var(hm, "uin");
 
	std::string password = get_http_var(hm, "password");
 

	
 
	if (jid.empty() || uin.empty() || password.empty()) {
 
	if (jid.empty() || uin.empty()) {
 
		send_ack(conn, true, "Insufficient data.");
 
	}
 
	else {
0 comments (0 inline, 0 general)