From 165438c0b46cb765a8930a313b47eba670ff143b Mon Sep 17 00:00:00 2001 From: Wolfgang Knopki Date: Fri, 12 Nov 2021 13:35:20 +0100 Subject: [PATCH] removed nonessential files --- mymodule/templates/.gitkeep | 0 mymodule/templates/selectsource.tpl.php | 28 ---- .../themes/fancytheme/core/loginuserpass.php | 82 ------------ .../fancytheme/default/includes/footer.php | 23 ---- .../fancytheme/default/includes/header.php | 124 ------------------ .../fancytheme/multiauth/selectsource.php | 85 ------------ 6 files changed, 342 deletions(-) delete mode 100644 mymodule/templates/.gitkeep delete mode 100644 mymodule/templates/selectsource.tpl.php delete mode 100644 mymodule/themes/fancytheme/core/loginuserpass.php delete mode 100644 mymodule/themes/fancytheme/default/includes/footer.php delete mode 100644 mymodule/themes/fancytheme/default/includes/header.php delete mode 100644 mymodule/themes/fancytheme/multiauth/selectsource.php diff --git a/mymodule/templates/.gitkeep b/mymodule/templates/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/mymodule/templates/selectsource.tpl.php b/mymodule/templates/selectsource.tpl.php deleted file mode 100644 index f520ef8..0000000 --- a/mymodule/templates/selectsource.tpl.php +++ /dev/null @@ -1,28 +0,0 @@ -data['header'] = $this->t('{multiauth:multiauth:select_source_header}'); -$this->includeAtTemplateBase('includes/header.php'); -?> - -

- -

- -
- -'; -foreach ($this->data['sources'] as $source) { - if ($source['source'] === $this->data['preferred']) { - $autofocus = ' autofocus="autofocus"'; - } else { - $autofocus = ''; - } - $name = 'src-'.base64_encode($source['source']); - echo ''; -} -echo ''; -?> -
-includeAtTemplateBase('includes/footer.php'); diff --git a/mymodule/themes/fancytheme/core/loginuserpass.php b/mymodule/themes/fancytheme/core/loginuserpass.php deleted file mode 100644 index 0e4b87f..0000000 --- a/mymodule/themes/fancytheme/core/loginuserpass.php +++ /dev/null @@ -1,82 +0,0 @@ -data['header'] = $this->t('{login:user_pass_header}'); - -if (strlen($this->data['username']) > 0) { - $this->data['autofocus'] = 'password'; -} else { - $this->data['autofocus'] = 'username'; -} -$this->includeAtTemplateBase('includes/header.php'); -?> -
-
-
-
-
-
- -data['errorcode'] !== null) { -?> -
- - -

t('{login:error_header}'); ?>

- -

- t( - $this->data['errorcodes']['title'][$this->data['errorcode']], - $this->data['errorparams'] - ) - ); - ?> -

-

- t( - $this->data['errorcodes']['descr'][$this->data['errorcode']], - $this->data['errorparams'] - ) - ); - ?> -

-
- - - -
-data['links'])) { - echo ''; -} - -$this->includeAtTemplateBase('includes/footer.php'); - diff --git a/mymodule/themes/fancytheme/default/includes/footer.php b/mymodule/themes/fancytheme/default/includes/footer.php deleted file mode 100644 index f9da9a2..0000000 --- a/mymodule/themes/fancytheme/default/includes/footer.php +++ /dev/null @@ -1,23 +0,0 @@ -data['htmlinject']['htmlContentPost'])) { - foreach ($this->data['htmlinject']['htmlContentPost'] as $c) { - echo $c; - } -} -?> - - - - - - - - - diff --git a/mymodule/themes/fancytheme/default/includes/header.php b/mymodule/themes/fancytheme/default/includes/header.php deleted file mode 100644 index 150b0ff..0000000 --- a/mymodule/themes/fancytheme/default/includes/header.php +++ /dev/null @@ -1,124 +0,0 @@ -data['htmlinject'] = [ - 'htmlContentPre' => [], - 'htmlContentPost' => [], - 'htmlContentHead' => [], -]; - -$jquery = []; -if (array_key_exists('jquery', $this->data)) { - $jquery = $this->data['jquery']; -} - -if (array_key_exists('pageid', $this->data)) { - $hookinfo = [ - 'pre' => &$this->data['htmlinject']['htmlContentPre'], - 'post' => &$this->data['htmlinject']['htmlContentPost'], - 'head' => &$this->data['htmlinject']['htmlContentHead'], - 'jquery' => &$jquery, - 'page' => $this->data['pageid'] - ]; - - SimpleSAML\Module::callHooks('htmlinject', $hookinfo); -} -// - o - o - o - o - o - o - o - o - o - o - o - o - - -/** - * Do not allow to frame SimpleSAMLphp pages from another location. - * This prevents clickjacking attacks in modern browsers. - * - * If you don't want any framing at all you can even change this to - * 'DENY', or comment it out if you actually want to allow foreign - * sites to put SimpleSAMLphp in a frame. The latter is however - * probably not a good security practice. - */ -header('X-Frame-Options: SAMEORIGIN'); - -?> - - - - - - -M4_LAB: User Login - - - - - - - -data['baseurlpath'].'resources/jquery-1.8.js">'."\n"; - } - - if (isset($jquery['ui']) && $jquery['ui']) { - echo ''."\n"; - } - - if (isset($jquery['css']) && $jquery['css']) { - echo ''."\n"; - } - } -} - -if (isset($this->data['clipboard.js'])) { - echo ''."\n"; -} - -if (!empty($this->data['htmlinject']['htmlContentHead'])) { - foreach ($this->data['htmlinject']['htmlContentHead'] as $c) { - echo $c; - } -} - -if ($this->isLanguageRTL()) { - ?> - - - - -data)) { - echo ''.$this->data['head'].''; -} -?> - -data)) { - $onLoad .= ' onload="SimpleSAML_focus(\''.$this->data['autofocus'].'\');"'; -} -?> -> - -
- -data['htmlinject']['htmlContentPre'])) { - foreach ($this->data['htmlinject']['htmlContentPre'] as $c) { - echo $c; - } -} -$config = \SimpleSAML\Configuration::getInstance(); -if(! $config->getBoolean('production', true)) { - echo '
' . $this->t('{preprodwarning:warning:warning}'). '
'; -} diff --git a/mymodule/themes/fancytheme/multiauth/selectsource.php b/mymodule/themes/fancytheme/multiauth/selectsource.php deleted file mode 100644 index e695206..0000000 --- a/mymodule/themes/fancytheme/multiauth/selectsource.php +++ /dev/null @@ -1,85 +0,0 @@ - $v) { - $k = explode('-', $k, 2); - if (count($k) === 2 && $k[0] === 'src') { - $source = base64_decode($k[1]); - } - } -} -if ($source !== null) { - if ($as !== null) { - $as->setPreviousSource($source); - } - \SimpleSAML\Module\multiauth\Auth\Source\MultiAuth::delegateAuthentication($source, $state); -} - -if (array_key_exists('multiauth:preselect', $state)) { - $source = $state['multiauth:preselect']; - \SimpleSAML\Module\multiauth\Auth\Source\MultiAuth::delegateAuthentication($source, $state); -} - -$globalConfig = \SimpleSAML\Configuration::getInstance(); -$t = new \SimpleSAML\XHTML\Template($globalConfig, 'mymodule:selectsource.tpl.php'); - -$defaultLanguage = $globalConfig->getString('language.default', 'en'); -$language = $t->getTranslator()->getLanguage()->getLanguage(); - -$sources = $state[\SimpleSAML\Module\multiauth\Auth\Source\MultiAuth::SOURCESID]; -foreach ($sources as $key => $source) { - $sources[$key]['source64'] = base64_encode($sources[$key]['source']); - if (isset($sources[$key]['text'][$language])) { - $sources[$key]['text'] = $sources[$key]['text'][$language]; - } else { - $sources[$key]['text'] = $sources[$key]['text'][$defaultLanguage]; - } - - if (isset($sources[$key]['help'][$language])) { - $sources[$key]['help'] = $sources[$key]['help'][$language]; - } else { - $sources[$key]['help'] = $sources[$key]['help'][$defaultLanguage]; - } -} - -$t->data['authstate'] = $authStateId; -$t->data['sources'] = $sources; -$t->data['selfUrl'] = $_SERVER['PHP_SELF']; - -if ($as !== null) { - $t->data['preferred'] = $as->getPreviousSource(); -} else { - $t->data['preferred'] = null; -} -$t->show(); -exit(); -- GitLab