From 39c938b29b6ce6a48c981f356793ed5473653361 Mon Sep 17 00:00:00 2001 From: jeena Date: Mon, 22 Apr 2013 12:37:51 +0200 Subject: [PATCH] fixed #213 --- WebKit/scripts/controller/Oauth.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/WebKit/scripts/controller/Oauth.js b/WebKit/scripts/controller/Oauth.js index 20cb76f..0cebc2e 100644 --- a/WebKit/scripts/controller/Oauth.js +++ b/WebKit/scripts/controller/Oauth.js @@ -47,9 +47,15 @@ function(HostApp, Paths, Hmac) { var entity = HostApp.stringForKey("entity"); - if (entity && (entity.startsWith("http://") || entity.startsWith("https://"))) { - this.entity = entity; - this.requestProfileURL(this.entity); + if (entity && entity.startsWith("http")) { + if((entity.startsWith("http://") || entity.startsWith("https://"))) { + this.entity = entity; + this.requestProfileURL(this.entity); + } else { + this.entity = "https://" + entity; + HostApp.setStringForKey(this.entity, "entity"); + this.requestProfileURL(this.entity); + } } else { HostApp.authentificationDidNotSucceed("The entity should start with https:// or http://"); }