From acdf079fb180490d8659fad0f4c20dd74ea78503 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 5 Jan 2017 12:52:25 +0100 Subject: [PATCH] * Etemplate: Fix error "Etemplate\Api\Auth not found" happening while to login --- .mrconfig | 52 +++++++++++++----------- api/src/Etemplate/Request.php | 2 +- api/src/Header/ContentSecurityPolicy.php | 2 +- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/.mrconfig b/.mrconfig index 7ed2927d57..564330cd28 100644 --- a/.mrconfig +++ b/.mrconfig @@ -46,17 +46,17 @@ checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed ' # projectmanagement and Ganttcharts checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/projectmanager.git -#[bookmarks] +[bookmarks] # record and share bookmarks -#checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/bookmarks.git +checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/bookmarks.git -#[news_admin] +[news_admin] # publish and agregate RSS or ATOM feeds -#checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/news_admin.git +checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/news_admin.git -#[registration] +[registration] # allows (after configuration!) to selfregister accounts and recover lost passwords -#checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/registration.git +checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/registration.git #[archive] # allows to integrate a Benno mail-archive into EGroupware @@ -65,33 +65,33 @@ checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed ' ### ### Older apps requiring to install phpgwapi and etemplate! ### -#[phpgwapi] +[phpgwapi] # old api used by non 16.1 apps -#checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/phpgwapi.git +checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/phpgwapi.git -#[jdots] +[jdots] # alternative "Stylite" template set -#checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/jdots.git +checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/jdots.git -#[etemplate] +[etemplate] # old templating system superseeded by eTemplate2 in 16.1+ api -#checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/etemplate.git +checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/etemplate.git -#[phpbrain] +[phpbrain] # knowledge base -#checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/phpbrain.git +checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/phpbrain.git -#[wiki] +[wiki] # wiki application -#checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/wiki.git +checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/wiki.git #[sambaadmin] # keeps passwords in sync with Samba3 using same LDAP as EGroupware (for Samba4 use Active Directory) #checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/sambaadmin.git -#[sitemgr] +[sitemgr] # content managment application -#checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/sitemgr.git +checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/sitemgr.git #[phpfreechat] # chat application @@ -102,10 +102,14 @@ checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed ' ### EPL apps not publicly available ### -#[stylite] -#checkout = git clone git@github.com:EGroupwareGmbH/epl.git stylite -#update = test -d .svn && { rm -rf * .svn; git clone git@github.com:EGroupwareGmbH/epl.git .; } || git pull --rebase +[stylite] +checkout = git clone git@github.com:EGroupwareGmbH/epl.git stylite +update = test -d .svn && { rm -rf * .svn; git clone git@github.com:EGroupwareGmbH/epl.git .; } || git pull --rebase -#[esyncpro] -#checkout = git clone git@github.com:EGroupwareGmbH/esyncpro.git -#update = test -d .svn && { rm -rf * .svn; git clone git@github.com:EGroupwareGmbH/esyncpro.git .; } || git pull --rebase +[esyncpro] +checkout = git clone git@github.com:EGroupwareGmbH/esyncpro.git +update = test -d .svn && { rm -rf * .svn; git clone git@github.com:EGroupwareGmbH/esyncpro.git .; } || git pull --rebase + +[profitbricks] +# profitbricks managed servers +checkout = git clone ${EGW_REPO_BASE:-$(git config --get remote.origin.url|sed 's|/egroupware.git||')}/profitbricks.git diff --git a/api/src/Etemplate/Request.php b/api/src/Etemplate/Request.php index 3d0e5a74d9..abc36d5df0 100644 --- a/api/src/Etemplate/Request.php +++ b/api/src/Etemplate/Request.php @@ -363,7 +363,7 @@ class Request // generate random token (using oppenssl if available otherwise mt_rand based Auth::randomstring) $token = function_exists('openssl_random_pseudo_bytes') ? base64_encode(openssl_random_pseudo_bytes(32)) : - Auth::randomstring(44); + \EGroupware\Api\Auth::randomstring(44); return $GLOBALS['egw_info']['flags']['currentapp'].'_'.$userID.'_'.$token; } diff --git a/api/src/Header/ContentSecurityPolicy.php b/api/src/Header/ContentSecurityPolicy.php index f3be50acb1..eef1cd066d 100644 --- a/api/src/Header/ContentSecurityPolicy.php +++ b/api/src/Header/ContentSecurityPolicy.php @@ -52,7 +52,7 @@ class ContentSecurityPolicy // set frame-src attrs of API and apps via hook if ($source == 'frame-src' && !isset($attrs)) { - $attrs = array('www.egroupware.org'); + $attrs = array('*.egroupware.org'); if (($app_additional = Api\Hooks::process('csp-frame-src'))) { foreach($app_additional as $addtional)