Skip to content

Commit

Permalink
get session id from commonist password field instead of env var
Browse files Browse the repository at this point in the history
  • Loading branch information
tomclegg committed Oct 24, 2010
1 parent c3a6f5e commit 2265444
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions commonist-0.3.43-wikifarm-1.15.patch
Expand Up @@ -17,11 +17,11 @@
// deprecated! client.State.CookiePolicy = CookiePolicy.COMPATIBILITY;
//client.HostConfiguration.setHost(LOGON_SITE, LOGON_PORT, "http");
}
@@ -652,6 +652,7 @@
connection = new Connection(client, site);
connections.put(wiki, connection);
}
+ client.getState().addCookie(new org.apache.commons.httpclient.Cookie (configManager.getSite(wiki).hostName, "open_id_session_id", System.getenv("COMMONIST_OPENID_SESSION"), "/", -1, false));
return connection;
@@ -325,6 +325,7 @@
/** log in */
public boolean login(String wiki, String user, String passwd, boolean remember) throws MediaWikiException {
Connection connection = connection(wiki);
+ client.getState().addCookie(new org.apache.commons.httpclient.Cookie (configManager.getSite(wiki).hostName, "open_id_session_id", passwd, "/", -1, false));
UserLoginAction action = new UserLoginAction(this, connection, user, passwd, remember);
action.execute(); return action.isSuccess();
}
}

0 comments on commit 2265444

Please sign in to comment.