From 10eef51a0f086ad148928ba965c330599b4765cb Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 4 Jun 2017 17:16:11 +0200 Subject: Update package for new web plugin interface --- radicale_web/web/infcloud/auth/.htaccess | 24 ------ radicale_web/web/infcloud/auth/common.inc | 41 ---------- radicale_web/web/infcloud/auth/config.inc | 58 -------------- radicale_web/web/infcloud/auth/cross_domain.inc | 14 ---- .../infcloud/auth/doc/example_config_response.xml | 88 ---------------------- radicale_web/web/infcloud/auth/doc/readme.txt | 7 -- radicale_web/web/infcloud/auth/index.php | 33 -------- radicale_web/web/infcloud/auth/plugins/generic.inc | 58 -------------- .../web/infcloud/auth/plugins/generic_conf.inc | 12 --- radicale_web/web/infcloud/auth/plugins/ldap.inc | 37 --------- .../web/infcloud/auth/plugins/ldap_conf.inc | 12 --- 11 files changed, 384 deletions(-) delete mode 100644 radicale_web/web/infcloud/auth/.htaccess delete mode 100644 radicale_web/web/infcloud/auth/common.inc delete mode 100644 radicale_web/web/infcloud/auth/config.inc delete mode 100644 radicale_web/web/infcloud/auth/cross_domain.inc delete mode 100644 radicale_web/web/infcloud/auth/doc/example_config_response.xml delete mode 100644 radicale_web/web/infcloud/auth/doc/readme.txt delete mode 100644 radicale_web/web/infcloud/auth/index.php delete mode 100644 radicale_web/web/infcloud/auth/plugins/generic.inc delete mode 100644 radicale_web/web/infcloud/auth/plugins/generic_conf.inc delete mode 100644 radicale_web/web/infcloud/auth/plugins/ldap.inc delete mode 100644 radicale_web/web/infcloud/auth/plugins/ldap_conf.inc (limited to 'radicale_web/web/infcloud/auth') diff --git a/radicale_web/web/infcloud/auth/.htaccess b/radicale_web/web/infcloud/auth/.htaccess deleted file mode 100644 index fb4203d..0000000 --- a/radicale_web/web/infcloud/auth/.htaccess +++ /dev/null @@ -1,24 +0,0 @@ -##################################################################################################### -# Apache configuration (REQUIRED to prevent access for .inc files /especially config files/) -# You NEED to add the following lines into your Apache vhost configuration (without the # character): -# -# AllowOverride Limit -# = 2.3> -# Require all granted -# -# -# Order allow,deny -# Allow from all -# -# -##################################################################################################### - - - = 2.3> - Require all granted - - - Order allow,deny - Deny from all - - diff --git a/radicale_web/web/infcloud/auth/common.inc b/radicale_web/web/infcloud/auth/common.inc deleted file mode 100644 index 419cefb..0000000 --- a/radicale_web/web/infcloud/auth/common.inc +++ /dev/null @@ -1,41 +0,0 @@ -\n"; - - foreach($array as $k => $v) - { - if(is_numeric($k)) - array_to_xml($v, $skip_top_closing, $level); - else - { - for($j=0; $j<$level; $j++) - $result.=" "; - - $result.="<".htmlspecialchars($k); - if($k=='resources') - $result.=" xmlns=\"urn:com.inf-it:configuration\""; - if($v=='') - $result.=" />\n"; - else - { - $result.=">"; - - if(is_array($v)) - { - $result.="\n"; - array_to_xml($v, $skip_top_closing, $level+1); - for($j=0; $j<$level; $j++) - $result.=" "; - } - else - $result.=htmlspecialchars($v); - - if($level!==0 || $skip_top_closing===false) - $result.="\n"; - } - } - } - return $result; - } -?> \ No newline at end of file diff --git a/radicale_web/web/infcloud/auth/config.inc b/radicale_web/web/infcloud/auth/config.inc deleted file mode 100644 index 534e524..0000000 --- a/radicale_web/web/infcloud/auth/config.inc +++ /dev/null @@ -1,58 +0,0 @@ -array()); - - // note: if you want to use regex values, then use one of the following formats (the second example is with regex modifier): 're:.*someregex.*[0-9]$' or 're|i:.*someregex.*[0-9]$' - // note: 'crossdomain' and 'withcredentials' are still available but there is NO REASON to use them (crossDomain is detected automatically, and I've never seen anyone who understand when to use withCredentials /there is NO REASON to set it to true!/) - // note: 'syncinterval' was removed - use globalSyncResourcesInterval in config.js instead - $config['accounts']['resources'][]=array( - 'resource'=>array( - 'type'=>array('addressbook'=>'', 'calendar'=>''), - 'href'=>(empty($_SERVER['HTTPS']) ? 'http' : 'https').'://www.server.com:80/caldav.php/'.$_SERVER['PHP_AUTH_USER'].'/', - 'hreflabel'=>'null', // if undefined or empty href value is used (see above) - 'forcereadonly'=>'null', // see auth/doc/example_config_response.xml for proper use, for example: 'forcereadonly'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re:^/caldav.php/user/collection[0-9]/$')), - 'settingsaccount'=>'true', // client properties are saved here (note: set it to true only for ONE account) - 'checkcontenttype'=>'true', // check content-type in the server response (if you cannot see data in the interface /buggy server response/ you may try to disable it) - 'delegation'=>'true', // see auth/doc/example_config_response.xml for proper use, for example: 'delegation'=>array(array('resource'=>'/caldav.php/user%40domain.com/'), array('resource'=>'re|i:^/caldav.php/a[b-x].+/$')), - 'ignorealarms'=>'false', // see auth/doc/example_config_response.xml for proper use, for example: 'ignorealarms'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re:^/caldav.php/user/collection[0-9]/$')), - 'backgroundcalendars'=>'', // see auth/doc/example_config_response.xml for proper use, for example: 'backgroundcalendars'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re|i:^/caldav.php/user/collection[0-9]/$')), - 'userauth'=>array( - 'username'=>$_SERVER['PHP_AUTH_USER'], - 'password'=>$_SERVER['PHP_AUTH_PW'] - ), - 'timeout'=>90000, - 'locktimeout'=>10000 - ) - ); - -/* - // additional accounts - $config['accounts']['resources'][]=array( - 'resource'=>array( - 'type'=>array('addressbook'=>'', 'calendar'=>''), - 'href'=>'http://www.server.com:80/caldav.php/resource/', - 'hreflabel'=>'null', // if undefined or empty href value is used (see above) - 'forcereadonly'=>'null', // see auth/doc/example_config_response.xml for proper use, for example: 'forcereadonly'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re:^/caldav.php/user/collection[0-9]/$')), - 'settingsaccount'=>'false', // client properties are saved here (note: set it to true only for ONE account) - 'checkcontenttype'=>'true', // check content-type in the server response (if you cannot see data in the interface /buggy server response/ you may try to disable it) - 'delegation'=>'true', // see auth/doc/example_config_response.xml for proper use, for example: 'delegation'=>array(array('resource'=>'/caldav.php/user%40domain.com/'), array('resource'=>'re|i:^/caldav.php/a[b-x].+/$')), - 'ignorealarms'=>'false', // see auth/doc/example_config_response.xml for proper use, for example: 'ignorealarms'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re:^/caldav.php/user/collection[0-9]/$')), - 'backgroundcalendars'=>'', // see auth/doc/example_config_response.xml for proper use, for example: 'backgroundcalendars'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re|i:^/caldav.php/user/collection[0-9]/$')), - 'userauth'=>array( - 'username'=>$_SERVER['PHP_AUTH_USER'], - 'password'=>$_SERVER['PHP_AUTH_PW'] - ), - 'timeout'=>90000, - 'locktimeout'=>10000 - ) - ); -*/ - -?> \ No newline at end of file diff --git a/radicale_web/web/infcloud/auth/cross_domain.inc b/radicale_web/web/infcloud/auth/cross_domain.inc deleted file mode 100644 index a6a10e0..0000000 --- a/radicale_web/web/infcloud/auth/cross_domain.inc +++ /dev/null @@ -1,14 +0,0 @@ - \ No newline at end of file diff --git a/radicale_web/web/infcloud/auth/doc/example_config_response.xml b/radicale_web/web/infcloud/auth/doc/example_config_response.xml deleted file mode 100644 index 9568049..0000000 --- a/radicale_web/web/infcloud/auth/doc/example_config_response.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - http://www.server.com:8080/principals/users/user/ - - null - null - false - true - true - true - false - - - user - password - - 90000 - 10000 - - - - - - - http://www.server2.com:80/caldav.php/user/ - - null - true - false - false - true - - /caldav.php/user/ - /principals/users/user%40domain.com/ - re:^/caldav.php/a[b-x].+/$ - re|i:^/caldav.php/a[b-x].+/$ - - - /caldav.php/user/collection/ - /caldav.php/user%40domain.com/collection/ - re:^/caldav.php/user/collection[0-9]/$ - re|i:^/caldav.php/user/collection[0-9]/$ - - - /caldav.php/user/collection/ - /caldav.php/user%40domain.com/collection/ - re:^/caldav.php/user/collection[0-9]/$ - re|i:^/caldav.php/user/collection[0-9]/$ - - - user - password - - 90000 - 10000 - - - - - - - https://www.server3.com:8443/caldav.php/user/ - - null - - /caldav.php/user/collection/ - /caldav.php/user%40domain.com/collection/ - re:^/caldav.php/user/collection[0-9]/$ - re|i:^/caldav.php/user/collection[0-9]/$ - - false - false - true - false - false - - - user - password - - 90000 - 10000 - - diff --git a/radicale_web/web/infcloud/auth/doc/readme.txt b/radicale_web/web/infcloud/auth/doc/readme.txt deleted file mode 100644 index 860d29c..0000000 --- a/radicale_web/web/infcloud/auth/doc/readme.txt +++ /dev/null @@ -1,7 +0,0 @@ -1.) configure your auth method (see the plugins directory) and the response XML in auth/config.inc and set $config['auth_send_authenticate_header']=true -2.) configure the selected auth module in plugins/PLUGIN_conf.inc -3.) check the correct response by visiting http://your-server.com/client_dir/auth/ and entering username and password -4.) set $config['auth_send_authenticate_header']=false in auth/config.inc - -By default the generic plugin is used for basic HTTP authentication ($config['auth_method']='generic'; in config.inc). - diff --git a/radicale_web/web/infcloud/auth/index.php b/radicale_web/web/infcloud/auth/index.php deleted file mode 100644 index e92f005..0000000 --- a/radicale_web/web/infcloud/auth/index.php +++ /dev/null @@ -1,33 +0,0 @@ - - - - 401 Authorization Required - - -

Authorization Required

-

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

- - -HTML; - exit(0); - } - else - { - header('Content-type: text/xml; charset="utf-8"'); - header('Cache-Control: max-age=0, must-revalidate, no-cache, no-store, no-transform, private'); - echo array_to_xml($config['accounts']); - } -?> \ No newline at end of file diff --git a/radicale_web/web/infcloud/auth/plugins/generic.inc b/radicale_web/web/infcloud/auth/plugins/generic.inc deleted file mode 100644 index 8e6b14b..0000000 --- a/radicale_web/web/infcloud/auth/plugins/generic.inc +++ /dev/null @@ -1,58 +0,0 @@ -\n"; - return -2; - } - else - { - $request=""; - - $out="PROPFIND ".$pluginconfig['request']." HTTP/1.1\r\n"; - $out.="Host: $hostname_clean\r\n"; - $out.="Authorization: Basic ".base64_encode($_SERVER['PHP_AUTH_USER'].':'.$_SERVER['PHP_AUTH_PW'])."\r\n"; - $out.="Depth: 0\r\n"; - $out.="Content-Type: text/xml; charset=\"utf-8\"\r\n"; - $out.="Content-Length:". strlen($request)."\r\n\r\n"; - $out.=$request; - fwrite($fp, $out); - - $result=''; - if(!feof($fp)) - $result.=fgets($fp); - fclose($fp); - - if(strpos($result, 'HTTP/1.1 207')===0) - return 1; // auth successful - else - return -1; // auth unsuccessful - } - } - return 0; // empty username or password - } -?> \ No newline at end of file diff --git a/radicale_web/web/infcloud/auth/plugins/generic_conf.inc b/radicale_web/web/infcloud/auth/plugins/generic_conf.inc deleted file mode 100644 index 01c2b32..0000000 --- a/radicale_web/web/infcloud/auth/plugins/generic_conf.inc +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/radicale_web/web/infcloud/auth/plugins/ldap.inc b/radicale_web/web/infcloud/auth/plugins/ldap.inc deleted file mode 100644 index f7012e5..0000000 --- a/radicale_web/web/infcloud/auth/plugins/ldap.inc +++ /dev/null @@ -1,37 +0,0 @@ - \ No newline at end of file diff --git a/radicale_web/web/infcloud/auth/plugins/ldap_conf.inc b/radicale_web/web/infcloud/auth/plugins/ldap_conf.inc deleted file mode 100644 index c9242c7..0000000 --- a/radicale_web/web/infcloud/auth/plugins/ldap_conf.inc +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file -- cgit