Skip to content

Commit

Permalink
add session sid.length & sid_bits_per_character
Browse files Browse the repository at this point in the history
  • Loading branch information
forgodssake committed Jul 16, 2018
1 parent dd33b5b commit e2e832d
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 99 deletions.
200 changes: 101 additions & 99 deletions manifests/ini.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,107 +12,109 @@
# }
#
define php::ini (
$ensure = undef,
$template = 'php/php.ini-el6.erb',
$ensure = undef,
$template = 'php/php.ini-el6.erb',
# php.ini options in the order they appear in the original file
$user_ini_filename = '.user.ini',
$user_ini_cache_ttl = '300',
$engine = 'On',
$short_open_tag = 'Off',
$asp_tags = 'Off',
$precision = '14',
$output_buffering = '4096',
$zlib_output_compression = 'Off',
$implicit_flush = 'Off',
$serialize_precision = '100',
$allow_call_time_pass_reference = 'Off',
$safe_mode = 'Off',
$safe_mode_gid = 'Off',
$safe_mode_include_dir = '',
$safe_mode_exec_dir = '',
$safe_mode_allowed_env_vars = 'PHP_',
$safe_mode_protected_env_vars = 'LD_LIBRARY_PATH',
$disable_functions = '',
$disable_classes = '',
$ignore_user_abort = undef,
$realpath_cache_size = undef,
$realpath_cache_ttl = undef,
$expose_php = 'On',
$max_execution_time = '30',
$max_input_time = '60',
$max_input_vars = '1000',
$memory_limit = '128M',
$error_reporting = 'E_ALL & ~E_DEPRECATED',
$display_errors = 'Off',
$display_startup_errors = 'Off',
$log_errors = 'On',
$log_errors_max_len = '1024',
$ignore_repeated_errors = 'Off',
$ignore_repeated_source = 'Off',
$report_memleaks = 'On',
$track_errors = 'Off',
$html_errors = 'Off',
$error_log = undef,
$variables_order = 'GPCS',
$request_order = 'GP',
$register_globals = 'Off',
$register_long_arrays = 'Off',
$register_argc_argv = 'Off',
$auto_globals_jit = 'On',
$post_max_size = '8M',
$magic_quotes_gpc = 'Off',
$magic_quotes_runtime = 'Off',
$magic_quotes_sybase = 'Off',
$auto_prepend_file = '',
$auto_append_file = '',
$default_mimetype = 'text/html',
$default_charset = undef,
$always_populate_raw_post_data = undef,
$include_path = undef,
$doc_root = '',
$user_dir = '',
$enable_dl = 'Off',
$cgi_fix_pathinfo = undef,
$file_uploads = 'On',
$upload_tmp_dir = undef,
$upload_max_filesize = '2M',
$max_file_uploads = '20',
$allow_url_fopen = 'On',
$allow_url_include = 'Off',
$default_socket_timeout = '60',
$date_timezone = undef,
$pcre_backtrack_limit = undef,
$pcre_recursion_limit = undef,
$phar_readonly = undef,
$sendmail_path = '/usr/sbin/sendmail -t -i',
$mail_add_x_header = 'On',
$sql_safe_mode = 'Off',
$browscap = undef,
$session_save_handler = 'files',
$session_save_path = '/var/lib/php/session',
$session_use_cookies = '1',
$session_cookie_secure = undef,
$session_use_only_cookies = '1',
$session_name = 'PHPSESSID',
$session_auto_start = '0',
$session_cookie_lifetime = '0',
$session_cookie_path = '/',
$session_cookie_domain = '',
$session_cookie_httponly = '',
$session_serialize_handler = 'php',
$session_gc_probability = '1',
$session_gc_divisor = '1000',
$session_gc_maxlifetime = '1440',
$session_bug_compat_42 = 'Off',
$session_bug_compat_warn = 'Off',
$session_referer_check = '',
$session_entropy_length = '0',
$session_hash_function = '0',
$user_ini_filename = '.user.ini',
$user_ini_cache_ttl = '300',
$engine = 'On',
$short_open_tag = 'Off',
$asp_tags = 'Off',
$precision = '14',
$output_buffering = '4096',
$zlib_output_compression = 'Off',
$implicit_flush = 'Off',
$serialize_precision = '100',
$allow_call_time_pass_reference = 'Off',
$safe_mode = 'Off',
$safe_mode_gid = 'Off',
$safe_mode_include_dir = '',
$safe_mode_exec_dir = '',
$safe_mode_allowed_env_vars = 'PHP_',
$safe_mode_protected_env_vars = 'LD_LIBRARY_PATH',
$disable_functions = '',
$disable_classes = '',
$ignore_user_abort = undef,
$realpath_cache_size = undef,
$realpath_cache_ttl = undef,
$expose_php = 'On',
$max_execution_time = '30',
$max_input_time = '60',
$max_input_vars = '1000',
$memory_limit = '128M',
$error_reporting = 'E_ALL & ~E_DEPRECATED',
$display_errors = 'Off',
$display_startup_errors = 'Off',
$log_errors = 'On',
$log_errors_max_len = '1024',
$ignore_repeated_errors = 'Off',
$ignore_repeated_source = 'Off',
$report_memleaks = 'On',
$track_errors = 'Off',
$html_errors = 'Off',
$error_log = undef,
$variables_order = 'GPCS',
$request_order = 'GP',
$register_globals = 'Off',
$register_long_arrays = 'Off',
$register_argc_argv = 'Off',
$auto_globals_jit = 'On',
$post_max_size = '8M',
$magic_quotes_gpc = 'Off',
$magic_quotes_runtime = 'Off',
$magic_quotes_sybase = 'Off',
$auto_prepend_file = '',
$auto_append_file = '',
$default_mimetype = 'text/html',
$default_charset = undef,
$always_populate_raw_post_data = undef,
$include_path = undef,
$doc_root = '',
$user_dir = '',
$enable_dl = 'Off',
$cgi_fix_pathinfo = undef,
$file_uploads = 'On',
$upload_tmp_dir = undef,
$upload_max_filesize = '2M',
$max_file_uploads = '20',
$allow_url_fopen = 'On',
$allow_url_include = 'Off',
$default_socket_timeout = '60',
$date_timezone = undef,
$pcre_backtrack_limit = undef,
$pcre_recursion_limit = undef,
$phar_readonly = undef,
$sendmail_path = '/usr/sbin/sendmail -t -i',
$mail_add_x_header = 'On',
$sql_safe_mode = 'Off',
$browscap = undef,
$session_save_handler = 'files',
$session_save_path = '/var/lib/php/session',
$session_use_cookies = '1',
$session_cookie_secure = undef,
$session_use_only_cookies = '1',
$session_name = 'PHPSESSID',
$session_auto_start = '0',
$session_cookie_lifetime = '0',
$session_cookie_path = '/',
$session_cookie_domain = '',
$session_cookie_httponly = '',
$session_serialize_handler = 'php',
$session_gc_probability = '1',
$session_gc_divisor = '1000',
$session_gc_maxlifetime = '1440',
$session_bug_compat_42 = 'Off',
$session_bug_compat_warn = 'Off',
$session_referer_check = '',
$session_entropy_length = '0',
$session_sid_bits_per_character = '6',
$session_sid_length = '48',
$session_hash_function = '0',
$session_hash_bits_per_character = '5',
$url_rewriter_tags = 'a=href,area=href,frame=src,input=src,form=fakeentry',
$soap_wsdl_cache_enabled = '1',
$soap_wsdl_cache_dir = '/tmp',
$soap_wsdl_cache_ttl = '86400',
$url_rewriter_tags = 'a=href,area=href,frame=src,input=src,form=fakeentry',
$soap_wsdl_cache_enabled = '1',
$soap_wsdl_cache_dir = '/tmp',
$soap_wsdl_cache_ttl = '86400',
) {

include '::php::common'
Expand Down
21 changes: 21 additions & 0 deletions templates/php.ini-el6.erb
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,27 @@ session.hash_function = <%= @session_hash_function %>
; http://www.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character
session.hash_bits_per_character = <%= @session_hash_bits_per_character %>

; Define how many bits are stored in each character when converting
; the binary hash data to something readable.
; Possible values:
; 4 (4 bits: 0-9, a-f)
; 5 (5 bits: 0-9, a-v)
; 6 (6 bits: 0-9, a-z, A-Z, "-", ",")
; Default Value: 4
; Development Value: 5
; Production Value: 5
; http://php.net/session.hash-bits-per-character
session.sid_bits_per_character = <%= @session_sid_bits_per_character %>

; Set session ID character length. This value could be between 22 to 256.
; Shorter length than default is supported only for compatibility reason.
; Users should use 32 or more chars.
; http://php.net/session.sid_length
; Default Value: 32
; Development Value: 26
; Production Value: 26
session.sid_length = <%= @session_sid_length %>

; The URL rewriter will look for URLs in a defined set of HTML tags.
; form/fieldset are special; if you include them here, the rewriter will
; add a hidden <input> field with the info which is otherwise appended
Expand Down

0 comments on commit e2e832d

Please sign in to comment.