From c7f40ca5662b01deb94c38579d3878b9ba8ebaf6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 28 Jan 2019 20:05:38 +0100 Subject: [PATCH] Recommend ynh_string_random instead of 'dd' or 'openssl rand' --- package_linter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package_linter.py b/package_linter.py index 3361e22..4710163 100755 --- a/package_linter.py +++ b/package_linter.py @@ -398,6 +398,9 @@ def check_deprecated_practices(path, script_name): if "exit" in script: 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)): 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 )")