Author: ralfbecker
New Revision: 55446
URL: http://svn.stylite.de/viewvc/egroupware?rev=55446&view=rev
Log:
moving egw_digest_auth, vfs_webdav_server and egw_sharing to new api
Added:
trunk/egroupware/api/src/Header/Authenticate.php
- copied, changed from r55427, trunk/phpgwapi/inc/class.egw_digest_auth.inc.php
trunk/egroupware/api/src/Vfs/Sharing.php
- copied, changed from r55427, trunk/phpgwapi/inc/class.egw_sharing.inc.php
trunk/egroupware/api/src/Vfs/WebDAV.php
- copied, changed from r55427, trunk/phpgwapi/inc/class.vfs_webdav_server.inc.php
trunk/egroupware/api/src/WebDAV/
- copied from r55427, trunk/phpgwapi/inc/HTTP/WebDAV/
Removed:
trunk/phpgwapi/inc/HTTP/WebDAV/
trunk/phpgwapi/inc/class.egw_sharing.inc.php
trunk/phpgwapi/inc/class.vfs_webdav_server.inc.php
Modified:
trunk/egroupware/ (props changed)
trunk/egroupware/api/src/Header/Content.php
trunk/egroupware/api/src/Session.php
trunk/egroupware/api/src/WebDAV/Server.php
trunk/egroupware/api/src/WebDAV/Server/Filesystem.php
trunk/egroupware/files/webdav.php
trunk/egroupware/groupdav.php
trunk/egroupware/remote.php
trunk/egroupware/share.php
trunk/egroupware/webdav.php
trunk/filemanager/inc/class.filemanager_shares.inc.php
trunk/phpgwapi/inc/class.egw_digest_auth.inc.php
trunk/phpgwapi/inc/class.groupdav.inc.php
Propchange: trunk/egroupware/
— svn:ignore (original)
+++ svn:ignore Sun Mar 20 17:19:53 2016
@@ -4,3 +4,5 @@
.swp
.swo
Gruntfile.js.old
+node_modules
+vendor
— trunk/phpgwapi/inc/class.egw_digest_auth.inc.php (original)
+++ trunk/egroupware/api/src/Header/Authenticate.php Sun Mar 20 17:19:53 2016
@@ -1,6 +1,6 @@
<?php
/**
- * eGroupWare API: Basic and Digest Auth
+ * EGroupware API: Basic and Digest Auth
*
* For Apache FCGI you need the following rewrite rule:
*
@@ -13,11 +13,15 @@
* @link http://www.egroupware.org
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package api
- * @subpackage auth
+ * @subpackage header
* @author Ralf Becker
- * @copyright (c) 2010 by Ralf Becker
+ * @copyright (c) 2010-16 by Ralf Becker
* @version $Id$
*/
+
+namespace EGroupware\Api\Header;
+
+use EGroupware\Api;
/**
* Class to authenticate via basic or digest auth
@@ -33,7 +37,7 @@
* 'noheader' => True,
* 'currentapp' => 'someapp',
* 'no_exception_handler' => 'basic_auth', // we use a basic auth exception handler (sends exception message as basic auth realm)
- * 'autocreate_session_callback' => array('egw_digest_auth','autocreate_session_callback'),
+ * 'autocreate_session_callback' => 'EGroupware\\Api\\Header\\Authenticate::autocreate_session_callback',
* 'auth_realm' => 'EGroupware',
* );
* include(dirname(__FILE__).'/header.inc.php');
@@ -46,14 +50,14 @@
* Commented out is accept-charset parameter from (seems not supported by any client I tested with)
* @link https://tools.ietf.org/id/draft-reschke-basicauth-enc-06.html
*
- * Implemented support for clients sending credentials in in iso-8859-1 instead of our utf-8:
+ * Implemented support for clients sending credentials in iso-8859-1 instead of our utf-8:
* - Firefox 19.0
* - Thunderbird 17.0.3 with Lightning 1.8
* - IE 8
* - Netdrive
* (Chrome 24 or Safari 6 sends credentials in charset of webpage.)
*/
-class egw_digest_auth
+class Authenticate
{
/**
* Log to error_log:
@@ -136,7 +140,7 @@
}, $password);
}
// try translating the password from iso-8859-1 to utf-8
- $password = translation::convert($password, 'iso-8859-1');
+ $password = Api\Translation::convert($password, 'iso-8859-1');
//error_log(__METHOD__."() Fixed non-ascii password of user '$username' from '$_SERVER[PHP_AUTH_PW]' to '$password'");
return true;
}
@@ -146,7 +150,7 @@
/**
* Check if digest auth is available for a given realm (and user): do we use cleartext passwords
*
- * If no user is given, check is NOT authoretive, as we can only check if cleartext passwords are generally used
+ * If no user is given, check is NOT authoritative, as we can only check if cleartext passwords are generally used
*
* @param string $realm
* @param string $username =null username or null to only check if we auth agains sql and use plaintext passwords
Modified: trunk/egroupware/api/src/Header/Content.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/egroupware/api/src/Header/Content.php?rev=55446&r1=55445&r2=55446&view=diff
==============================================================================
--- trunk/egroupware/api/src/Header/Content.php (original)
+++ trunk/egroupware/api/src/Header/Content.php Sun Mar 20 17:19:53 2016
@@ -28,9 +28,9 @@
*
* Mitigate risk of html downloads by using CSP or force download for IE
*
- * @param resource|string &$content content might be changed by this call
+ * @param resource|string& $content content might be changed by this call
* @param string $path filename or path for content-disposition header
- * @param string &$mime ='' mimetype or '' (default) to detect it from filename, using mime_magic::filename2mime()
+ * @param string& $mime ='' mimetype or '' (default) to detect it from filename, using mime_magic::filename2mime()
* on return used, maybe changed, mime-type
* @param int $length =0 content length, default 0 = skip that header
* on return changed size
Modified: trunk/egroupware/api/src/Session.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/egroupware/api/src/Session.php?rev=55446&r1=55445&r2=55446&view=diff
==============================================================================
--- trunk/egroupware/api/src/Session.php (original)
+++ trunk/egroupware/api/src/Session.php Sun Mar 20 17:19:53 2016
@@ -24,7 +24,6 @@
// explicitly reference classes still in phpgwapi
use egw_mailer;
-use egw_digest_auth; // egw_digest_auth::parse_digest
/**
* Create, verifies or destroys an EGroupware session
@@ -831,7 +830,7 @@
{
// we generate a pseudo-sessionid from the digest username, realm and nounce
// can't use full $_SERVER['PHP_AUTH_DIGEST'], as it changes (contains eg. the url)
- $data = egw_digest_auth::parse_digest($_SERVER['PHP_AUTH_DIGEST']);
+ $data = Header\Authenticate::parse_digest($_SERVER['PHP_AUTH_DIGEST']);
$sessionid = md5($data['username'].':'.$data['realm'].':'.$data['nonce'].':'.$_SERVER['HTTP_HOST'].
EGW_SERVER_ROOT.':'.self::getuser_ip().':'.filemtime(EGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php').
':'.$_SERVER['HTTP_USER_AGENT']);
Copied: trunk/egroupware/api/src/Vfs/Sharing.php (from r55427, trunk/phpgwapi/inc/class.egw_sharing.inc.php)
URL: http://svn.stylite.de/viewvc/egroupware/trunk/egroupware/api/src/Vfs/Sharing.php?p2=trunk/egroupware/api/src/Vfs/Sharing.php&p1=trunk/phpgwapi/inc/class.egw_sharing.inc.php&r1=55427&r2=55446&rev=55446&view=diff
==============================================================================
--- trunk/phpgwapi/inc/class.egw_sharing.inc.php (original)
+++ trunk/egroupware/api/src/Vfs/Sharing.php Sun Mar 20 17:19:53 2016
@@ -5,16 +5,30 @@
* @link http://www.egroupware.org
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package api
+ * @subpackage Vfs
* @author Ralf Becker