Recommend ynh_string_random instead of 'dd' or 'openssl rand'

This commit is contained in:
Alexandre Aubin 2019-01-28 20:05:38 +01:00
parent 8060598fed
commit c7f40ca566

View file

@ -398,6 +398,9 @@ def check_deprecated_practices(path, script_name):
if "exit" in script: if "exit" in script:
print_warning("'exit' command shouldn't be used. Please use 'ynh_die' instead.") print_warning("'exit' command shouldn't be used. Please use 'ynh_die' instead.")
if "dd if=/dev/urandom" in script or "openssl rand" in script:
print_warning("Instead of 'dd if=/dev/urandom' or 'openssl rand', you might want to use ynh_string_random")
if os.path.exists("%s/../conf/php-fpm.ini" % os.path.dirname(path)): if os.path.exists("%s/../conf/php-fpm.ini" % os.path.dirname(path)):
print_warning("Using a separate php-fpm.ini file is deprecated. Please merge your php-fpm directives directly in the pool file. (c.f. https://github.com/YunoHost-Apps/nextcloud_ynh/issues/138 )") print_warning("Using a separate php-fpm.ini file is deprecated. Please merge your php-fpm directives directly in the pool file. (c.f. https://github.com/YunoHost-Apps/nextcloud_ynh/issues/138 )")