1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dotclear2_ynh.git synced 2024-09-03 18:26:29 +02:00

Merge pull request #39 from YunoHost-Apps/testing

2.20.1
This commit is contained in:
Kayou 2021-12-23 16:36:57 +01:00 committed by GitHub
commit ccca78c3c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 49 deletions

View file

@ -9,7 +9,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
## Overview ## Overview
Dotclear is an open-source web publishing software. Dotclear is an open-source web publishing software.
**Shipped version:** 2.19 **Shipped version:** 2.20.1
## Screenshots ## Screenshots

View file

@ -1,5 +1,5 @@
SOURCE_URL=http://download.dotclear.org/latest/dotclear-2.19.zip SOURCE_URL=http://download.dotclear.org/latest/dotclear-2.20.1.zip
SOURCE_SUM=51c36592a432d9290dae3da7b01b1f6a9ac2a693b3e05db84be452313417c3f6 SOURCE_SUM=fdd919ac1d1499987bb6707a585f9e5eae34d3cdf9f62db9852ea9cd6f8e17a9
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -20,7 +20,6 @@ class ldapDcAuth extends dcAuth
if ($ds) if ($ds)
{ {
ldap_set_option ($ds, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option ($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
if (ldap_bind($ds, "uid=".$user_id.",ou=users,".$this->base, $pwd)) if (ldap_bind($ds, "uid=".$user_id.",ou=users,".$this->base, $pwd))
{ {
# search the user in ldap, and get infos # search the user in ldap, and get infos
@ -29,6 +28,8 @@ class ldapDcAuth extends dcAuth
$info = ldap_get_entries($ds, $sr); $info = ldap_get_entries($ds, $sr);
if ($info["count"] == 1) if ($info["count"] == 1)
{
try
{ {
$this->con->begin(); $this->con->begin();
$cur = $this->con->openCursor($this->user_table); $cur = $this->con->openCursor($this->user_table);
@ -71,16 +72,24 @@ class ldapDcAuth extends dcAuth
$this->sudo(array($this->core, 'setUserBlogPermissions'), $user_id, 'default', array('usage'=>true)); # Can change this, PR are welcome $this->sudo(array($this->core, 'setUserBlogPermissions'), $user_id, 'default', array('usage'=>true)); # Can change this, PR are welcome
} }
$this->con->commit(); $this->con->commit();
}
catch (Exception $e)
{
# In case of error we cancel and return "false"
$this->con->rollback();
return false;
}
# The previous operations proceeded without error, # The previous operations proceeded without error,
# we can now call the parent method # we can now call the parent method
return parent::checkUser($user_id, $pwd); return parent::checkUser($user_id, $pwd);
} }
} }
else
{
error_log("Failed to connect with the user ".$user_id);
} }
# In case of error we cancel and return "false" }
$this->con->rollback(); return parent::checkUser($user_id, $pwd);
return false;
} }
} }
?> ?>

View file

@ -6,7 +6,7 @@
"en": "Blog publishing application", "en": "Blog publishing application",
"fr": "Moteur de blog" "fr": "Moteur de blog"
}, },
"version": "2.19~ynh3", "version": "2.20.1~ynh1",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
"url": "https://dotclear.org/", "url": "https://dotclear.org/",
"maintainer": { "maintainer": {

View file

@ -66,9 +66,7 @@ if [ -z "$final_path" ]; then
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi fi
is_public=$(ynh_app_setting_get --app=$app --key=is_public) if [ -n "$(ynh_app_setting_get --app=$app --key=is_public)" ]; then
if [ -n "$is_public" ]; then
ynh_app_setting_delete --app=$app --key=protected_uris ynh_app_setting_delete --app=$app --key=protected_uris
# Removing skipped/unprotected_uris under certain conditions, remove the visitors group added during the migration process of 3.7 # Removing skipped/unprotected_uris under certain conditions, remove the visitors group added during the migration process of 3.7