When workstation is invalid request a new seed
authorThomas Berezansky <tsbere@mvlc.org>
Mon, 12 Sep 2011 17:33:03 +0000 (13:33 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 4 Oct 2011 16:54:22 +0000 (12:54 -0400)
The original one may no longer be valid

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/xul/staff_client/chrome/content/auth/session.js

index ca5cb0d..c3f9a13 100644 (file)
@@ -60,6 +60,15 @@ auth.session.prototype = {
                         data.stash('ws_info');
                         data.ws_name = null; data.stash('ws_name');
                         params.type = 'temp';
+                        // We need to get a new seed
+                        init = this.network.request(
+                            api.AUTH_INIT.app,
+                            api.AUTH_INIT.method,
+                            [ this.view.name_prompt.value ]
+                        );
+                        if(init) {
+                            params.password = hex_md5(init + hex_md5( this.view.password_prompt.value ));
+                        }
                         robj = this.network.simple_request('AUTH_COMPLETE',[ params ]);
                         if (robj.ilsevent == 0) {
                             this.key = robj.payload.authtoken;