mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1753 from YapWC/enh-2287-allow-dots-in-username
[enh] Update user.py
This commit is contained in:
commit
83df4d9ff0
7 changed files with 27 additions and 18 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
yunohost (11.2.8.2) stable; urgency=low
|
||||||
|
|
||||||
|
- Aleks forgot to remove pdb.set_trace ... (54a6a1b3)
|
||||||
|
|
||||||
|
-- Alexandre Aubin <alex.aubin@mailoo.org> Sat, 09 Dec 2023 18:26:10 +0100
|
||||||
|
|
||||||
yunohost (11.2.8.1) stable; urgency=low
|
yunohost (11.2.8.1) stable; urgency=low
|
||||||
|
|
||||||
- apps: fix change_url again, otherwise the lack of path_url default to the old path and fucks up the nginx regen (169c9214)
|
- apps: fix change_url again, otherwise the lack of path_url default to the old path and fucks up the nginx regen (169c9214)
|
||||||
|
|
|
@ -351,13 +351,12 @@ ynh_setup_source() {
|
||||||
if [ -d "$YNH_APP_BASEDIR/sources/patches/" ]; then
|
if [ -d "$YNH_APP_BASEDIR/sources/patches/" ]; then
|
||||||
local patches_folder=$(realpath $YNH_APP_BASEDIR/sources/patches/)
|
local patches_folder=$(realpath $YNH_APP_BASEDIR/sources/patches/)
|
||||||
if (($(find $patches_folder -type f -name "${source_id}-*.patch" 2>/dev/null | wc --lines) > "0")); then
|
if (($(find $patches_folder -type f -name "${source_id}-*.patch" 2>/dev/null | wc --lines) > "0")); then
|
||||||
(
|
pushd "$dest_dir"
|
||||||
cd "$dest_dir"
|
|
||||||
for p in $patches_folder/${source_id}-*.patch; do
|
for p in $patches_folder/${source_id}-*.patch; do
|
||||||
echo $p
|
echo $p
|
||||||
patch --strip=1 <$p
|
patch --strip=1 <$p || ynh_die --message="Unable to apply patches"
|
||||||
done
|
done
|
||||||
) || ynh_die --message="Unable to apply patches"
|
popd
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -374,7 +373,13 @@ ynh_setup_source() {
|
||||||
for stuff_to_keep in $keep; do
|
for stuff_to_keep in $keep; do
|
||||||
if [ -e "$keep_dir/$stuff_to_keep" ]; then
|
if [ -e "$keep_dir/$stuff_to_keep" ]; then
|
||||||
mkdir --parents "$(dirname "$dest_dir/$stuff_to_keep")"
|
mkdir --parents "$(dirname "$dest_dir/$stuff_to_keep")"
|
||||||
cp --archive "$keep_dir/$stuff_to_keep" "$dest_dir/$stuff_to_keep"
|
|
||||||
|
# We add "--no-target-directory" (short option is -T) to handle the special case
|
||||||
|
# when we "keep" a folder, but then the new setup already contains the same dir (but possibly empty)
|
||||||
|
# in which case a regular "cp" will create a copy of the directory inside the directory ...
|
||||||
|
# resulting in something like /var/www/$app/data/data instead of /var/www/$app/data
|
||||||
|
# cf https://unix.stackexchange.com/q/94831 for a more elaborate explanation on the option
|
||||||
|
cp --archive --no-target-directory "$keep_dir/$stuff_to_keep" "$dest_dir/$stuff_to_keep"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -300,8 +300,8 @@
|
||||||
"diagnosis_domain_expiration_not_found": "Non riesco a controllare la data di scadenza di alcuni domini",
|
"diagnosis_domain_expiration_not_found": "Non riesco a controllare la data di scadenza di alcuni domini",
|
||||||
"diagnosis_dns_try_dyndns_update_force": "La configurazione DNS di questo dominio dovrebbe essere gestita automaticamente da YunoHost. Se non avviene, puoi provare a forzare un aggiornamento usando il comando <cmd>yunohost dyndns update --force</cmd>.",
|
"diagnosis_dns_try_dyndns_update_force": "La configurazione DNS di questo dominio dovrebbe essere gestita automaticamente da YunoHost. Se non avviene, puoi provare a forzare un aggiornamento usando il comando <cmd>yunohost dyndns update --force</cmd>.",
|
||||||
"diagnosis_dns_point_to_doc": "Controlla la documentazione a <a href='https://yunohost.org/dns_config'>https://yunohost.org/dns_config</a> se hai bisogno di aiuto nel configurare i record DNS.",
|
"diagnosis_dns_point_to_doc": "Controlla la documentazione a <a href='https://yunohost.org/dns_config'>https://yunohost.org/dns_config</a> se hai bisogno di aiuto nel configurare i record DNS.",
|
||||||
"diagnosis_dns_discrepancy": "Il record DNS non sembra seguire la configurazione DNS raccomandata:<br>Type: <code>{type}</code><br>Name: <code>{name}</code><br>Current value: <code>{current}</value><br>Expected value: <code>{value}</value>",
|
"diagnosis_dns_discrepancy": "Il record DNS non sembra seguire la configurazione DNS raccomandata:<br>Type: <code>{type}</code><br>Name: <code>{name}</code><br>Current value: <code>{current}</code><br>Expected value: <code>{value}</code>",
|
||||||
"diagnosis_dns_missing_record": "Stando alla configurazione DNS raccomandata, dovresti aggiungere un record DNS con le seguenti informazioni.<br>Type: <code>{type}</code><br>Name: <code>{name}</code><br>Value: <code>{value}</value>",
|
"diagnosis_dns_missing_record": "Stando alla configurazione DNS raccomandata, dovresti aggiungere un record DNS con le seguenti informazioni.<br>Type: <code>{type}</code><br>Name: <code>{name}</code><br>Value: <code>{value}</code>",
|
||||||
"diagnosis_dns_bad_conf": "Alcuni record DNS sono mancanti o incorretti per il dominio {domain} (categoria {category})",
|
"diagnosis_dns_bad_conf": "Alcuni record DNS sono mancanti o incorretti per il dominio {domain} (categoria {category})",
|
||||||
"diagnosis_dns_good_conf": "I recordDNS sono configurati correttamente per il dominio {domain} (categoria {category})",
|
"diagnosis_dns_good_conf": "I recordDNS sono configurati correttamente per il dominio {domain} (categoria {category})",
|
||||||
"diagnosis_ip_weird_resolvconf_details": "Il file <code>/etc/resolv.conf</code> dovrebbe essere un symlink a <code>/etc/resolvconf/run/resolv.conf</code> che punta a <code>127.0.0.1</code> (dnsmasq). Se vuoi configurare manualmente i DNS, modifica <code>/etc/resolv.dnsmasq.conf</code>.",
|
"diagnosis_ip_weird_resolvconf_details": "Il file <code>/etc/resolv.conf</code> dovrebbe essere un symlink a <code>/etc/resolvconf/run/resolv.conf</code> che punta a <code>127.0.0.1</code> (dnsmasq). Se vuoi configurare manualmente i DNS, modifica <code>/etc/resolv.dnsmasq.conf</code>.",
|
||||||
|
|
|
@ -501,10 +501,6 @@ def app_change_url(operation_logger, app, domain, path):
|
||||||
|
|
||||||
change_url_script = os.path.join(tmp_workdir_for_app, "scripts/change_url")
|
change_url_script = os.path.join(tmp_workdir_for_app, "scripts/change_url")
|
||||||
|
|
||||||
import pdb
|
|
||||||
|
|
||||||
pdb.set_trace()
|
|
||||||
|
|
||||||
# Execute App change_url script
|
# Execute App change_url script
|
||||||
change_url_failed = True
|
change_url_failed = True
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -377,6 +377,8 @@ def hook_exec(
|
||||||
r"pg_ctlcluster \d\d main start",
|
r"pg_ctlcluster \d\d main start",
|
||||||
r"Ver\s*Cluster\s*Port\s*Status\s*Owner\s*Data\s*directory",
|
r"Ver\s*Cluster\s*Port\s*Status\s*Owner\s*Data\s*directory",
|
||||||
r"/var/lib/postgresql/\d\d/main /var/log/postgresql/postgresql-\d\d-main.log",
|
r"/var/lib/postgresql/\d\d/main /var/log/postgresql/postgresql-\d\d-main.log",
|
||||||
|
# Java boring messages
|
||||||
|
r"cannot open '/etc/ssl/certs/java/cacerts'",
|
||||||
]
|
]
|
||||||
return all(not re.search(w, msg) for w in irrelevant_warnings)
|
return all(not re.search(w, msg) for w in irrelevant_warnings)
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ from yunohost.utils.system import binary_to_human
|
||||||
logger = getActionLogger("yunohost.user")
|
logger = getActionLogger("yunohost.user")
|
||||||
|
|
||||||
FIELDS_FOR_IMPORT = {
|
FIELDS_FOR_IMPORT = {
|
||||||
"username": r"^[a-z0-9_]+$",
|
"username": r"^[a-z0-9_.]+$",
|
||||||
"firstname": r"^([^\W\d_]{1,30}[ ,.\'-]{0,3})+$",
|
"firstname": r"^([^\W\d_]{1,30}[ ,.\'-]{0,3})+$",
|
||||||
"lastname": r"^([^\W\d_]{1,30}[ ,.\'-]{0,3})+$",
|
"lastname": r"^([^\W\d_]{1,30}[ ,.\'-]{0,3})+$",
|
||||||
"password": r"^|(.{3,})$",
|
"password": r"^|(.{3,})$",
|
||||||
|
|
|
@ -29,11 +29,11 @@ YUNOHOST_PACKAGES = ["yunohost", "yunohost-admin", "moulinette", "ssowat"]
|
||||||
|
|
||||||
|
|
||||||
def debian_version():
|
def debian_version():
|
||||||
return check_output('grep "^VERSION_CODENAME=" /etc/os-release | cut -d= -f2')
|
return check_output('grep "^VERSION_CODENAME=" /etc/os-release 2>/dev/null | cut -d= -f2')
|
||||||
|
|
||||||
|
|
||||||
def system_arch():
|
def system_arch():
|
||||||
return check_output("dpkg --print-architecture")
|
return check_output("dpkg --print-architecture 2>/dev/null")
|
||||||
|
|
||||||
|
|
||||||
def system_virt():
|
def system_virt():
|
||||||
|
@ -44,7 +44,7 @@ def system_virt():
|
||||||
# Detect virt technology (if not bare metal) and arch
|
# Detect virt technology (if not bare metal) and arch
|
||||||
# Gotta have this "|| true" because it systemd-detect-virt return 'none'
|
# Gotta have this "|| true" because it systemd-detect-virt return 'none'
|
||||||
# with an error code on bare metal ~.~
|
# with an error code on bare metal ~.~
|
||||||
return check_output("systemd-detect-virt || true")
|
return check_output("systemd-detect-virt 2>/dev/null || true")
|
||||||
|
|
||||||
|
|
||||||
def free_space_in_directory(dirpath):
|
def free_space_in_directory(dirpath):
|
||||||
|
|
Loading…
Add table
Reference in a new issue