From 527b64e3645d374215eab4b3023c8e193f425796 Mon Sep 17 00:00:00 2001 From: Hugues Peccatte Date: Tue, 21 Jul 2015 14:56:38 +0200 Subject: Simplify if statements. Signed-off-by: Hugues Peccatte --- js/tbl_change.js | 42 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/js/tbl_change.js b/js/tbl_change.js index bac1b8fb01..ccbf52f5b8 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -341,38 +341,28 @@ AJAX.registerOnload('tbl_change.js', function () { // validate the comment form when it is submitted $("#insertForm").validate(); jQuery.validator.addMethod("validationFunctionForHex", function(value, element) { - if (value.match(/^[a-f0-9]*$/i) === null) { - return false; - } else { - return true; - } + return value.match(/^[a-f0-9]*$/i) !== null; }); jQuery.validator.addMethod("validationFunctionForFuns", function(value, element, options) { if (value.substring(0, 3) === "AES" && options.data('type') !== 'HEX') { return false; - } else if (value.substring(0, 3) === "MD5" - && typeof options.data('maxlength') !== 'undefined' - && options.data('maxlength') < 32) { - return false; - } else { - return true; } + + return !(value.substring(0, 3) === "MD5" + && typeof options.data('maxlength') !== 'undefined' + && options.data('maxlength') < 32); }); jQuery.validator.addMethod("validationFunctionForDateTime", function(value, element, options) { var dt_value = value; var theType = options; if (theType == "date") { - if (! isDate(dt_value)) { - return false; - } - return true; + return isDate(dt_value); + } else if (theType == "time") { - if (! isTime(dt_value)) { - return false; - } - return true; + return isTime(dt_value); + } else if (theType == "datetime" || theType == "timestamp") { var tmstmp = false; dt_value = dt_value.trim(); @@ -387,17 +377,11 @@ AJAX.registerOnload('tbl_change.js', function () { } var dv = dt_value.indexOf(" "); if (dv == -1) { // Only the date component, which is valid - if (! isDate(dt_value, tmstmp)) { - return false; - } - return true; - } else { - if (! (isDate(dt_value.substring(0, dv), tmstmp) - && isTime(dt_value.substring(dv + 1)))) { - return false; - } - return true; + return isDate(dt_value, tmstmp); } + + return isDate(dt_value.substring(0, dv), tmstmp) + && isTime(dt_value.substring(dv + 1)); } }); /* -- cgit v1.2.3 From 676cfcefba7521ab8de2dbfe9fca550769202a6a Mon Sep 17 00:00:00 2001 From: Koo Youngmin Date: Wed, 22 Jul 2015 08:22:01 +0200 Subject: Translated using Weblate (Korean) Currently translated at 77.4% (2448 of 3161 strings) [CI skip] --- po/ko.po | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/po/ko.po b/po/ko.po index 3fa8f77f58..535033cc7e 100644 --- a/po/ko.po +++ b/po/ko.po @@ -4,16 +4,16 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2015-07-20 06:34-0400\n" -"PO-Revision-Date: 2015-03-30 03:03+0200\n" -"Last-Translator: Kyeong Su Shin \n" -"Language-Team: Korean \n" +"PO-Revision-Date: 2015-07-22 08:21+0200\n" +"Last-Translator: Koo Youngmin \n" +"Language-Team: Korean " +"\n" "Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 2.3-dev\n" +"X-Generator: Weblate 2.4-dev\n" #: changelog.php:37 license.php:28 #, php-format @@ -678,16 +678,14 @@ msgid "Import has been successfully finished, %d queries executed." msgstr "가져오기를 성공적으로 마쳤습니다. %d 쿼리가 실행되었습니다." #: import.php:692 -#, fuzzy, php-format +#, php-format #| msgid "" #| "Script timeout passed, if you want to finish import, please resubmit same " #| "file and import will resume." msgid "" "Script timeout passed, if you want to finish import, please %sresubmit the " "same file%s and import will resume." -msgstr "" -"스크립트 타임아웃이 통보되었습니다. 가져오기를 이어서 계속 완료시키려면 같은 " -"파일을 다시 전송해주십시오." +msgstr "스크립트 시간 제한이 초과되었습니다. 이어서 하시려면 같은 파일을 다시 전송해 주세요 (%s, %s)." #: import.php:702 msgid "" @@ -699,7 +697,7 @@ msgstr "" #: import_status.php:103 msgid "Could not load the progress of the import." -msgstr "" +msgstr "가져오기에 필요한 절차를 로드할 수 없습니다." #: import_status.php:112 js/messages.php:378 libraries/Util.class.php:776 #: libraries/export.lib.php:515 @@ -826,7 +824,6 @@ msgid "List of changes" msgstr "변경 목록" #: index.php:451 -#, fuzzy #| msgid "" #| "Your configuration file contains settings (root with no password) that " #| "correspond to the default MySQL privileged account. Your MySQL server is " @@ -838,9 +835,8 @@ msgid "" "default, is open to intrusion, and you really should fix this security hole " "by setting a password for user 'root'." msgstr "" -"환경설정파일에 MySQL 관리자 암호가 없습니다. 이같은 기본설정상태로 MySQL 서버" -"가 작동한다면 누구나 침입할 수 있으므로, 'root'유저에 암호를 설정하여 이 보" -"안 취약점을 수정하시기 바랍니다." +"비밀번호 없이 MySQL의 최고 권한을 가지고 있는 root 유저로 로그인했습니다. MySQL 서버는 외부의 해킹에 대해 취약한 기본 " +"설정으로 돌아가고 있으며, 설정에서 root 유저의 비밀번호를 설정하는 것으로 이 취약점을 최대한 빨리 고쳐야 합니다." #: index.php:468 msgid "" -- cgit v1.2.3 From 27c5a92f97e96e2cc74c98f7b9d10d5553d8bc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 22 Jul 2015 10:42:32 +0200 Subject: Document how to configure Apache to request HTTP auth for phpMyAdmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- doc/setup.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/setup.rst b/doc/setup.rst index 3f96746c0d..172a41fd76 100644 --- a/doc/setup.rst +++ b/doc/setup.rst @@ -625,7 +625,23 @@ are always ways to make your installation more secure: phpMyAdmin, you can use :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` to limit them. * Consider hiding phpMyAdmin behind an authentication proxy, so that users need to authenticate prior to providing MySQL credentials - to phpMyAdmin. + to phpMyAdmin. You can achieve this by confiuring your web server to request + HTTP authentication. For exaple in Apache this can be done by: + + .. code-block:: apache + + AuthType Basic + AuthName "Restricted Access" + AuthUserFile /usr/share/phpmyadmin/passwd + Require valid-user + + Once you have changed configuration, you need to create list of users which + can authenticate. This can be done using :program:`htpasswd` utility: + + .. code-block:: sh + + htpasswd -c /usr/share/phpmyadmin/passwd username + * If you are afraid of automated attacks, enabling Captcha by :config:option:`$cfg['CaptchaLoginPublicKey']` and :config:option:`$cfg['CaptchaLoginPrivateKey']` might be an option. -- cgit v1.2.3