Révision 8c5e4549
Ajouté par Julien Enselme il y a plus de 10 ans
bin/d7-reset-variables.sh | ||
---|---|---|
20 | 20 |
random_2=`dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" "` |
21 | 21 |
|
22 | 22 |
####### General variables |
23 |
drush -y vset --always-set reverse_proxy TRUE |
|
24 |
drush -y vset --always-set --format=json reverse_proxy_addresses '["147.94.19.16","147.94.19.17"]' |
|
25 |
drush -y ev "variable_set('update_notify_emails', array('$email_multi_assos'));" |
|
26 |
drush -y vset error_level 0 |
|
27 |
drush -y vset dblog_row_limit 1000 |
|
28 |
drush -y vset cron_safe_threshold 0 |
|
23 |
drush -yq vset --always-set reverse_proxy TRUE
|
|
24 |
drush -yq vset --always-set --format=json reverse_proxy_addresses '["147.94.19.16","147.94.19.17"]'
|
|
25 |
drush -yq ev "variable_set('update_notify_emails', array('$email_multi_assos'));"
|
|
26 |
drush -yq vset error_level 0
|
|
27 |
drush -yq vset dblog_row_limit 1000
|
|
28 |
drush -yq vset cron_safe_threshold 0
|
|
29 | 29 |
|
30 | 30 |
###### Hidden captcha |
31 |
drush -y en hidden_captcha |
|
31 |
drush -yq en hidden_captcha
|
|
32 | 32 |
# Log wrong answers. |
33 |
drush -y vset captcha_log_wrong_responses 1 |
|
33 |
drush -yq vset captcha_log_wrong_responses 1
|
|
34 | 34 |
# Use hidden captcha for all forms. |
35 |
drush -y sqlq --db-prefix "UPDATE {captcha_points} SET module = 'hidden_captcha', captcha_type = 'Hidden CAPTCHA' WHERE module is NULL;" |
|
35 |
drush -yq sqlq --db-prefix "UPDATE {captcha_points} SET module = 'hidden_captcha', captcha_type = 'Hidden CAPTCHA' WHERE module is NULL;"
|
|
36 | 36 |
# Flush captcha cache. |
37 |
drush -y vdel captcha_placement_map_cache |
|
37 |
drush -yq vdel captcha_placement_map_cache
|
|
38 | 38 |
# Randomely generate a math question as the label of the hidden captcha field. |
39 |
drush -y vset hidden_captcha_label "$random_1 + $random_2" |
|
39 |
drush -yq vset hidden_captcha_label "$random_1 + $random_2"
|
|
40 | 40 |
|
41 | 41 |
|
42 | 42 |
####### Piwik |
... | ... | |
47 | 47 |
# 1: anonymous user |
48 | 48 |
# 2: authenticated user |
49 | 49 |
# 3: administrator |
50 |
drush -y en security_review |
|
51 |
drush -y ev "variable_set('security_review_untrusted_roles', array('1'));" |
|
50 |
drush -yq en security_review
|
|
51 |
drush -yq ev "variable_set('security_review_untrusted_roles', array('1'));"
|
|
52 | 52 |
# The default method to check settings.php do not work because we include a global and local settings.php |
53 |
drush vset security_review_base_url_method include |
|
53 |
drush -yq vset security_review_base_url_method include
|
|
54 | 54 |
# Used to initialise entries in the database schema. |
55 |
drush security-review --store |
|
55 |
drush -yq security-review --store
|
|
56 | 56 |
# file_perms : Security Review can't check for files permissions on multi_assos if launched within the web interface. |
57 | 57 |
# private_files : we have chosen a private path in the files repository and Security Review raise errors but this path is secure. |
58 |
drush -y sqlq --db-prefix "UPDATE {security_review} SET skip = '1', skiptime = $current_timestamp, skipuid = '1' WHERE reviewcheck IN ('file_perms', 'private_files');" |
|
59 |
drush -y sqlq --db-prefix "UPDATE {security_review} SET skip = '0', skiptime = '0', skipuid = NULL WHERE reviewcheck NOT IN ('file_perms', 'private_files');" |
|
58 |
drush -yq sqlq --db-prefix "UPDATE {security_review} SET skip = '1', skiptime = $current_timestamp, skipuid = '1' WHERE reviewcheck IN ('file_perms', 'private_files');" |
|
59 |
drush -yq sqlq --db-prefix "UPDATE {security_review} SET skip = '0', skiptime = '0', skipuid = NULL WHERE reviewcheck NOT IN ('file_perms', 'private_files');" |
Formats disponibles : Unified diff
Rapport par mail:
Devrait réduire la quantité d'info inutiles (voir #201)