Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 24, 2022
2 parents e1a6588 + 5c6bd68 commit d0976a6
Show file tree
Hide file tree
Showing 18 changed files with 50 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Expand Up @@ -57,7 +57,7 @@ jobs:
run: |
# Set up the Apache and PHP
sudo apt-get update > /dev/null
sudo apt install php libapache2-mod-php -y
sudo apt install php libapache2-mod-php7.2 -y
sudo cp -f ./tests/CI-pipeline/github-actions-apache /etc/apache2/sites-available/000-default.conf
sudo sed -e "s?%CI_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
Expand Down
2 changes: 1 addition & 1 deletion application/config/version.php
Expand Up @@ -16,5 +16,5 @@
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['templateapiversion'] = 3;
$config['assetsversionnumber'] = '30302';
$config['assetsversionnumber'] = '30303';
return $config;
1 change: 1 addition & 0 deletions application/controllers/RegisterController.php
Expand Up @@ -93,6 +93,7 @@ public function actionIndex($sid = null)
} else {
$iSurveyId = Yii::app()->request->getPost('sid');
}
$iSurveyId = (int) $iSurveyId;

$oSurvey = Survey::model()->find("sid=:sid", array(':sid' => $iSurveyId));
/* Throw 404 if needed */
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/Themes.php
Expand Up @@ -875,7 +875,7 @@ public function templatesavechanges()
in_array($relativePathEditfile, $jsfiles) === false
) {
Yii::app()->user->setFlash('error', gT('Invalid theme name'));
$this->getController()->redirect(array("admin/themes/sa/upload"));
$this->getController()->redirect(array("admin/themes/sa/upload"));
}

//$savefilename = $oEditedTemplate
Expand Down
15 changes: 7 additions & 8 deletions application/core/plugins/AuthLDAP/AuthLDAP.php
Expand Up @@ -238,8 +238,7 @@ private function _createNewUser($new_user, $password = null)
if (empty($ldapmode) || $ldapmode == 'simplebind') {
// Use the user's account for LDAP search
$ldapbindsearch = @ldap_bind($ldapconn, $prefix . $new_user . $suffix, $password);
}
else if (empty($binddn)) {
} elseif (empty($binddn)) {
// There is no account defined to do the LDAP search,
// let's use anonymous bind instead
$ldapbindsearch = @ldap_bind($ldapconn);
Expand Down Expand Up @@ -312,9 +311,10 @@ private function _createNewUser($new_user, $password = null)
}

/**
* Create LDAP connection
* Create LDAP connection and return it
* In case of error : return an array with errorCode
*
* @return mixed
* @return array|Class|resource, array id error.
*/
private function createConnection()
{
Expand All @@ -334,7 +334,7 @@ private function createConnection()
$ldapserver = 'ldap://' . $ldapserver;
}
$ldapconn = ldap_connect($ldapserver . ':' . (int) $ldapport);
if (false == $ldapconn) {
if ($ldapconn === false) {
// LDAP connect does not connect, but just checks the URI
// A real connection is only created on the first following ldap_* command
return array("errorCode" => 2, "errorMessage" => gT('LDAP URI could not be parsed.'));
Expand All @@ -361,7 +361,6 @@ private function createConnection()
return array("errorCode" => 100, 'errorMessage' => ldap_error($ldapconn));
}
}

return $ldapconn;
}

Expand Down Expand Up @@ -478,9 +477,9 @@ public function newUserSession()
$groupsearchbase = $this->get('groupsearchbase');
$groupsearchfilter = $this->get('groupsearchfilter');

// Try to connect
/* Get the conexion, createConnection return an error in array, never return false */
$ldapconn = $this->createConnection();
if ($ldapconn === false) {
if (isset($ldapconn['errorCode'])) {
$this->setAuthFailure($ldapconn['errorCode'], gT($ldapconn['errorMessage']));
return;
}
Expand Down
16 changes: 16 additions & 0 deletions docs/release_notes.txt
Expand Up @@ -34,6 +34,22 @@ Thank you to everyone who helped with this new release!

CHANGE LOG
------------------------------------------------------
Changes from 5.4.7 (build 221019) to 5.4.8 (build 221024) October 24, 2022
-Fixed issue: Cannot edit file in theme editor (Carsten Schmitz)
-Fixed issue #18413: Cannot authenticate with LDAP when using PHP 8.1 (Denis Chenu)
-Fixed issue #18403: Debug output when loading demo site (#2649) (Gabriel Jenik)
#Updated translation: Slovak by jelen1
#Updated translation: Polish by elissa
#Updated translation: Polish (Informal) by elissa
#Updated translation: Japanese by nomoto
#Updated translation: Finnish by Jmantysalo
#Updated translation: Dutch by Han
#Updated translation: Dutch (Informal) by Han
#Updated translation: Czech by jelen1
#Updated translation: Czech (Informal) by jelen1
#Updated translation: Chinese (Simplified) by duestin, FangZhijian, xiongrui, zengqing, zhanginshanghai, Zoctan


Changes from 5.4.6 (build 221018) to 5.4.7 (build 221019) October 18, 2022
-Fixed issue: [security] Various major & minor security issues discovered by automated security tools (Carsten Schmitz)
#Updated translation: Polish by elissa
Expand Down
46 changes: 23 additions & 23 deletions locale/_template/limesurvey.pot
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: LimeSurvey language file\n"
"Report-Msgid-Bugs-To: http://translate.limesurvey.org/\n"
"POT-Creation-Date: 2022-10-18 11:02:43+00:00\n"
"POT-Creation-Date: 2022-10-24 09:31:06+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -1420,52 +1420,52 @@ msgstr ""
msgid "You can't reorder in an active survey"
msgstr ""

#: application/controllers/RegisterController.php:165
#: application/controllers/RegisterController.php:166
#: application/helpers/SurveyRuntimeHelper.php:1651
msgid "Your answer to the security question was not correct - please try again."
msgstr ""

#: application/controllers/RegisterController.php:174
#: application/controllers/RegisterController.php:175
msgid "You must enter a valid email. Please try again."
msgstr ""

#: application/controllers/RegisterController.php:176
#: application/controllers/RegisterController.php:177
msgid "The email you used is not valid. Please try again."
msgstr ""

#: application/controllers/RegisterController.php:181
#: application/controllers/RegisterController.php:182
msgid "%s cannot be left empty."
msgstr ""

#: application/controllers/RegisterController.php:292
#: application/controllers/RegisterController.php:293
msgid "Thank you for registering to participate in this survey."
msgstr ""

#: application/controllers/RegisterController.php:298
#: application/controllers/RegisterController.php:299
msgid "You are registered but an error happened when trying to send the email - please contact the survey administrator."
msgstr ""

#: application/controllers/RegisterController.php:300
#: application/controllers/RegisterController.php:301
msgid "Survey administrator %s (%s)"
msgstr ""

#: application/controllers/RegisterController.php:325
#: application/controllers/RegisterController.php:326
msgid "The email address you have entered is already registered and the survey has been completed."
msgstr ""

#: application/controllers/RegisterController.php:329
#: application/controllers/RegisterController.php:330
msgid "This email address cannot be used because it was opted out of this survey."
msgstr ""

#: application/controllers/RegisterController.php:332
#: application/controllers/RegisterController.php:333
msgid "This email address is already registered but the email adress was bounced."
msgstr ""

#: application/controllers/RegisterController.php:334
#: application/controllers/RegisterController.php:335
msgid "The address you have entered is already registered. An email has been sent to this address with a link that gives you access to the survey."
msgstr ""

#: application/controllers/RegisterController.php:355
#: application/controllers/RegisterController.php:356
msgid "An email has been sent to the address you provided with access details for this survey. Please follow the link in that email to proceed."
msgstr ""

Expand Down Expand Up @@ -3600,7 +3600,7 @@ msgstr ""
#: application/controllers/admin/SurveyPermission.php:67
#: application/controllers/admin/SurveyPermission.php:528
#: application/core/LsDefaultDataSets.php:2937
#: application/core/plugins/AuthLDAP/AuthLDAP.php:379
#: application/core/plugins/AuthLDAP/AuthLDAP.php:378
#: application/core/plugins/Authdb/Authdb.php:128
#: application/core/plugins/TwoFactorAdminLogin/models/TFAUser.php:117
#: application/core/plugins/TwoFactorAdminLogin/models/TFAUserKey.php:105
Expand Down Expand Up @@ -3678,8 +3678,8 @@ msgid "A user with this username already exists."
msgstr ""

#: application/controllers/UserManagementController.php:1297
#: application/core/plugins/AuthLDAP/AuthLDAP.php:286
#: application/core/plugins/AuthLDAP/AuthLDAP.php:301
#: application/core/plugins/AuthLDAP/AuthLDAP.php:285
#: application/core/plugins/AuthLDAP/AuthLDAP.php:300
#: application/core/plugins/Authdb/Authdb.php:65
#: application/core/plugins/Authdb/Authdb.php:75
msgid "Failed to add user"
Expand Down Expand Up @@ -8912,19 +8912,19 @@ msgstr ""
msgid "Use LDAP authentication"
msgstr ""

#: application/core/plugins/AuthLDAP/AuthLDAP.php:252
#: application/core/plugins/AuthLDAP/AuthLDAP.php:251
msgid "Could not connect to LDAP server."
msgstr ""

#: application/core/plugins/AuthLDAP/AuthLDAP.php:278
#: application/core/plugins/AuthLDAP/AuthLDAP.php:277
msgid "Username not found in LDAP server"
msgstr ""

#: application/core/plugins/AuthLDAP/AuthLDAP.php:279
#: application/core/plugins/AuthLDAP/AuthLDAP.php:278
msgid "Verify username and try again"
msgstr ""

#: application/core/plugins/AuthLDAP/AuthLDAP.php:287
#: application/core/plugins/AuthLDAP/AuthLDAP.php:286
#: application/core/plugins/Authdb/Authdb.php:66
msgid "The email address is not valid."
msgstr ""
Expand All @@ -8937,7 +8937,7 @@ msgstr ""
msgid "Error creating LDAP connection"
msgstr ""

#: application/core/plugins/AuthLDAP/AuthLDAP.php:380
#: application/core/plugins/AuthLDAP/AuthLDAP.php:379
#: application/core/plugins/Authdb/Authdb.php:129
#: application/libraries/Save.php:221 application/models/User.php:131
#: application/views/admin/authentication/newPassword.php:41
Expand All @@ -8946,11 +8946,11 @@ msgstr ""
msgid "Password"
msgstr ""

#: application/core/plugins/AuthLDAP/AuthLDAP.php:541
#: application/core/plugins/AuthLDAP/AuthLDAP.php:540
msgid "Valid username but not authorized by group restriction"
msgstr ""

#: application/core/plugins/AuthLDAP/AuthLDAP.php:568
#: application/core/plugins/AuthLDAP/AuthLDAP.php:567
msgid "Credentials are valid but we failed to create a user"
msgstr ""

Expand Down
Binary file modified locale/cs-informal/cs-informal.mo
Binary file not shown.
Binary file modified locale/cs/cs.mo
Binary file not shown.
Binary file modified locale/fi/fi.mo
Binary file not shown.
Binary file modified locale/ja/ja.mo
Binary file not shown.
Binary file modified locale/nl-informal/nl-informal.mo
Binary file not shown.
Binary file modified locale/nl/nl.mo
Binary file not shown.
Binary file modified locale/pl-informal/pl-informal.mo
Binary file not shown.
Binary file modified locale/pl/pl.mo
Binary file not shown.
Binary file modified locale/sk/sk.mo
Binary file not shown.
Binary file modified locale/te/te.mo
Binary file not shown.
Binary file modified locale/zh-Hans/zh-Hans.mo
Binary file not shown.

0 comments on commit d0976a6

Please sign in to comment.