From edd099666293212421283bca7558903d79aaeb22 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Fri, 1 Jan 2016 09:48:57 +0100 Subject: [PATCH] baculum: Tweak fields validation in initial wizard --- .../protected/Class/ConfigurationManager.php | 34 +++++++++++++++ gui/baculum/protected/Lang/en/messages.mo | Bin 28071 -> 28229 bytes gui/baculum/protected/Lang/en/messages.po | 3 ++ gui/baculum/protected/Lang/pl/messages.mo | Bin 30368 -> 30533 bytes gui/baculum/protected/Lang/pl/messages.po | 3 ++ .../protected/Pages/ConfigurationWizard.page | 39 +++++++++--------- .../protected/Pages/ConfigurationWizard.php | 8 +++- gui/baculum/themes/Baculum-v1/style.css | 9 +++- 8 files changed, 73 insertions(+), 23 deletions(-) diff --git a/gui/baculum/protected/Class/ConfigurationManager.php b/gui/baculum/protected/Class/ConfigurationManager.php index b5692817bb..db22b11468 100644 --- a/gui/baculum/protected/Class/ConfigurationManager.php +++ b/gui/baculum/protected/Class/ConfigurationManager.php @@ -43,6 +43,11 @@ class ConfigurationManager extends TModule */ const USERS_FILE = 'Application.Data.baculum'; + /** + * User name allowed characters pattern + */ + const USER_PATTERN = '[a-zA-Z0-9]+'; + /** * PostgreSQL default params */ @@ -71,6 +76,7 @@ class ConfigurationManager extends TModule /** * Get database name by database type (short name). + * * @access public * @param string $type database type ('pgsql', 'mysql' ...) * @return mixed database name or null if database name not found @@ -88,6 +94,7 @@ class ConfigurationManager extends TModule /** * Check if given database type is PostgreSQL type. + * * @access public * @param string $type database type ('pgsql', 'mysql' ...) * @return boolean true if database type is PostgreSQL, otherwise false @@ -98,6 +105,7 @@ class ConfigurationManager extends TModule /** * Check if given database type is MySQL type. + * * @access public * @param string $type database type ('pgsql', 'mysql' ...) * @return boolean true if database type is MySQL, otherwise false @@ -108,6 +116,7 @@ class ConfigurationManager extends TModule /** * Check if given database type is SQLite type. + * * @access public * @param string $type database type ('sqlite', 'mysql' ...) * @return boolean true if database type is SQLite, otherwise false @@ -119,6 +128,7 @@ class ConfigurationManager extends TModule /** * Get currently set application language short name. * If no language set then default language is taken. + * * @access public * @return string lanuage short name */ @@ -135,6 +145,7 @@ class ConfigurationManager extends TModule /** * Save application configuration. + * * @access public * @param array $config structure of config file params * @return boolean true if config save is successfully, false if config save is failure @@ -146,6 +157,7 @@ class ConfigurationManager extends TModule /** * Get application configuration. + * * @access public * @return array application configuration */ @@ -156,6 +168,7 @@ class ConfigurationManager extends TModule /** * Check if application configuration file exists. + * * @access public * @return boolean true if file exists, otherwise false */ @@ -163,6 +176,16 @@ class ConfigurationManager extends TModule return file_exists(Prado::getPathOfNamespace(self::CONFIG_FILE, '.conf')); } + /** + * Get user name allowed characters pattern + * + * @access public + * @return string user name pattern + */ + public function getUserPattern() { + return self::USER_PATTERN; + } + /** * Get encrypted password to use in HTTP Basic auth. * @@ -284,6 +307,7 @@ class ConfigurationManager extends TModule /** * Check if users configuration file exists. + * * @access public * @return boolean true if file exists, otherwise false */ @@ -293,6 +317,7 @@ class ConfigurationManager extends TModule /** * Clear all content of users file. + * * @access public * @return boolean true if file cleared successfully, otherwise false */ @@ -320,6 +345,15 @@ class ConfigurationManager extends TModule public function switchToUser($http_protocol, $host, $port, $user, $password) { $urlPrefix = $this->Application->getModule('friendly-url')->getUrlPrefix(); $location = sprintf("%s://%s:%s@%s:%d%s", $http_protocol, $user, $password, $host, $port, $urlPrefix); + $refresh_url = sprintf("%s://%s:%d%s", $http_protocol, $host, $port, $urlPrefix); + + /** + * Refresh page is required due to lack of auth data in $_SERVER superglobal array + * after re-login by URI. + */ + $_SESSION['refresh_page'] = $refresh_url; + + // Log in by header header("Location: $location"); } diff --git a/gui/baculum/protected/Lang/en/messages.mo b/gui/baculum/protected/Lang/en/messages.mo index 4ffd86e024aa42f7275e0df2f77ba6344ff76226..53838bef85aa50cdf1adec9dc4379f4b44dca07f 100644 GIT binary patch delta 8237 zcmbu^cX(Ar8prXILPANQ1qh*BAO!*mEp$Q$X`uy>B9M?^=p_`T$k7!M6cr4LxS(PI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9)Xd{B3{x;2TcTFH2+62-n9#A0NTnggUvocBLvi9J@iozn^G~CW z5MrahPB{~9W%tO>9bcA6+;s?s@{VncC1sI}p*47iX2)2heg7!Bs zfzUC7$R-BSuH!M{Nn#AqGl1v6kivU}UZusvBH|*^hqyxMC_-mG`Cdo6$tRTcKP;xA zj@u4z5@ryMh*-||MIC9x7eou%Vu&h~n-VSc{_~ppKQ!Py%1IrS9R8pE_&J?u$GLbr zUl>>}BN!v;9!oTEME9>x`i`MWT9B$_SW$NGMEz5p#%B#C@U-ah&*o z&@rC4>@V>rIQ>>pevZ&Dpl7sm%h7lTml5X)9pMgdEdF8TQDzc$q0bP!OMFJ;rvCqq zU#;;v)*#Lj1-P~?@i}FU?>}18(CHsHIY4V+qC9QAiA|KR5?MsfF_88^DvgOS;&JLZ zM;;1CtsPUW9uz^Z*J5kH5VCo)ai8fZRrUs7piDI->Co(CYAx;vZ z#C{^0_AKHE<@&@pVi=J|+uQgmF*j%Z&r-=vd`vt=ROF&JF(1*4@-@skQmD_S@;XtG z$VH?Q-w=g3H=NLsNc`q6xgP_qoX+{dc1@>X8e4mt2S@J?-Q1(om|UB`O=uEF=~D6k E0xQf|j{pDw diff --git a/gui/baculum/protected/Lang/en/messages.po b/gui/baculum/protected/Lang/en/messages.po index 1179348a93..714dd39455 100644 --- a/gui/baculum/protected/Lang/en/messages.po +++ b/gui/baculum/protected/Lang/en/messages.po @@ -1130,3 +1130,6 @@ msgstr "Username:" msgid "Please note that for each user (excluding administrator) there should exist separate Bconsole config file in form:" msgstr "Please note that for each user (excluding administrator) there should exist separate Bconsole config file in form:" +msgid "Invalid login value. Login may contain a-z A-Z 0-9 characters." +msgstr "Invalid login value. Login may contain a-z A-Z 0-9 characters." + diff --git a/gui/baculum/protected/Lang/pl/messages.mo b/gui/baculum/protected/Lang/pl/messages.mo index 5b082983cc07bab398ac793328a01c696cbcf168..b748100927d705003a7429c13a7a557d26bfc906 100644 GIT binary patch delta 8240 zcmZA63w+P@9>?+D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X ziW;2p_{^3^S!-Z7?iq?thyz4^>i_S!Ya4&Vc;X`A&$aD{uPLj4_tA!iE`NK-x3mTk zn-0RU(D*1>!W}M|?v>&_0qlM!6m_ff!D-r0pYIK`h9d|EpB; z6JHTCh)P`a0Tv{hQNDwDM_uaksJu&5BJvT9h;u|B=h6us3B)~j$@~~(%gLM{Vz24q ZO=BBp+mML;e%pps85XlGxO>&e{{T7sU0(nI diff --git a/gui/baculum/protected/Lang/pl/messages.po b/gui/baculum/protected/Lang/pl/messages.po index ae77299db4..774876fb35 100644 --- a/gui/baculum/protected/Lang/pl/messages.po +++ b/gui/baculum/protected/Lang/pl/messages.po @@ -1131,3 +1131,6 @@ msgstr "Nazwa użytkownika:" msgid "Please note that for each user (excluding administrator) there should exist separate Bconsole config file in form:" msgstr "Uwaga! Dla każdego użytkownika (wyłączając administratora) powinien istnieć osobny plik konfiguracyjny Bconsole w postaci:" +msgid "Invalid login value. Login may contain a-z A-Z 0-9 characters." +msgstr "Niepoprawny login. Login może zawierać znaki z zakresu: a-z A-Z 0-9" + diff --git a/gui/baculum/protected/Pages/ConfigurationWizard.page b/gui/baculum/protected/Pages/ConfigurationWizard.page index 2568fb78b0..b0ca6c48e5 100644 --- a/gui/baculum/protected/Pages/ConfigurationWizard.page +++ b/gui/baculum/protected/Pages/ConfigurationWizard.page @@ -61,7 +61,7 @@ - + @@ -70,7 +70,7 @@

- +
@@ -84,7 +84,7 @@ - + @@ -92,14 +92,14 @@
- +
- +
@@ -110,21 +110,21 @@
- +
- +
- +
@@ -147,7 +147,7 @@ <%[ Loading... ]%> Validate <%[ OK ]%> - Invalidate <%[ Connection error ]%> + Invalidate <%[ Connection error ]%> @@ -162,14 +162,14 @@
- +
- +
@@ -198,7 +198,7 @@ <%[ Loading... ]%> Validate <%[ OK ]%> - Invalidate <%[ Connection error ]%> + Invalidate <%[ Connection error ]%> @@ -218,7 +218,7 @@
- +
@@ -231,24 +231,25 @@
- + +
- - + +
- - - + + +
diff --git a/gui/baculum/protected/Pages/ConfigurationWizard.php b/gui/baculum/protected/Pages/ConfigurationWizard.php index 8be23c600a..d9a4e498ba 100644 --- a/gui/baculum/protected/Pages/ConfigurationWizard.php +++ b/gui/baculum/protected/Pages/ConfigurationWizard.php @@ -32,6 +32,7 @@ class ConfigurationWizard extends BaculumPage { public $firstRun; public $applicationConfig; + public $userPattern; const DEFAULT_DB_NAME = 'bacula'; const DEFAULT_DB_LOGIN = 'bacula'; @@ -42,8 +43,10 @@ class ConfigurationWizard extends BaculumPage public function onInit($param) { parent::onInit($param); $this->Lang->SelectedValue = $_SESSION['language']; - $this->firstRun = !$this->getModule('configuration')->isApplicationConfig(); - $this->applicationConfig = $this->getModule('configuration')->getApplicationConfig(); + $config = $this->getModule('configuration'); + $this->firstRun = !$config->isApplicationConfig(); + $this->applicationConfig = $config->getApplicationConfig(); + $this->userPattern = $config->getUserPattern(); if($this->firstRun === false && $this->User->getIsAdmin() === false) { die('Access denied.'); } @@ -112,6 +115,7 @@ class ConfigurationWizard extends BaculumPage if($this->getModule('configuration')->isUsersConfig() === true) { // version with users config file, so next is try to auto-login $previousUser = ($this->firstRun === false) ? $this->applicationConfig['baculum']['login'] : null; $this->getModule('configuration')->setUsersConfig($cfgData['baculum']['login'], $cfgData['baculum']['password'], $this->firstRun, $previousUser); + // Automatic login after finish wizard. $http_protocol = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 'https' : 'http'; $this->getModule('configuration')->switchToUser($http_protocol, $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $cfgData['baculum']['login'], $cfgData['baculum']['password']); diff --git a/gui/baculum/themes/Baculum-v1/style.css b/gui/baculum/themes/Baculum-v1/style.css index 57a0789bb7..23cc8c0757 100644 --- a/gui/baculum/themes/Baculum-v1/style.css +++ b/gui/baculum/themes/Baculum-v1/style.css @@ -376,7 +376,7 @@ div.actions_btn { } .line { - height: 35px; + min-height: 35px; clear: both; } @@ -397,12 +397,16 @@ div.actions_btn { width: 98%; } -.validator, .validate { +.validator, .validate, .validator-block { color: #e3454b !important; font-size: 10pt; /*margin-left: 5px;*/ } +.validator-block { + display: block; +} + .validate { color: #96c600 !important; } @@ -873,6 +877,7 @@ fieldset { } fieldset .line { + min-height: initial; height: 25px; } -- 2.39.5