summaryrefslogtreecommitdiffstats
path: root/apps/user_openid/user.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-20 00:53:55 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-20 00:53:55 +0200
commit9bc3991c230ca464b8af9b7fb219ee7925edcac9 (patch)
tree28bae863374353071e6fde6906128f63a0e66c9c /apps/user_openid/user.php
parent332cab0c559361e7295d4a993329d610a050bf94 (diff)
downloadnextcloud-server-9bc3991c230ca464b8af9b7fb219ee7925edcac9.tar.gz
nextcloud-server-9bc3991c230ca464b8af9b7fb219ee7925edcac9.zip
serveral small fixes to the openid server
Diffstat (limited to 'apps/user_openid/user.php')
-rw-r--r--apps/user_openid/user.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/user_openid/user.php b/apps/user_openid/user.php
index 52af9ba3a56..4b5d13e3398 100644
--- a/apps/user_openid/user.php
+++ b/apps/user_openid/user.php
@@ -25,6 +25,9 @@ $USERNAME=substr($_SERVER["REQUEST_URI"],strpos($_SERVER["REQUEST_URI"],'.php/')
if(strpos($USERNAME,'?')!==false){
$USERNAME=substr($USERNAME,0,strpos($USERNAME,'?'));
}
+if(substr($USERNAME,-1,1)=='/'){//openid sometimes add slashes to the username
+ $USERNAME=substr($USERNAME,0,-1);
+}
if($USERNAME=='' and isset($_SERVER['PHP_AUTH_USER'])){
@@ -36,7 +39,8 @@ $RUNTIME_NOAPPS=false;
require_once '../../lib/base.php';
if(!OC_USER::userExists($USERNAME)){
- $USERNAME='';
+ error_log($USERNAME.' doesn\'t exist');
+ $USERNAME='';
}
global $WEBROOT;
$IDENTITY=((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].$WEBROOT.'/apps/user_openid/user.php/'.$USERNAME;