@ -15,7 +15,7 @@ module.exports = {
paramConverter : paramConverter ( {
timeFields : [ 'hot_threads_max_age' , 'inactive_account_time' , 'default_ban_duration' , 'block_bypass_expire_after_time' , 'dnsbl_cache_time' , 'board_defaults_delete_protection_age' ] ,
trimFields : [ 'captcha_options_grid_question' , 'captcha_options_grid_trues' , 'captcha_options_grid_falses' , 'captcha_options_font' , 'allowed_hosts' , 'dnsbl_blacklists' , 'other_mime_types' ,
'highlight_options_language_subset' , 'global_limits_custom_css_filters' , 'board_defaults_filters' , 'filters' , 'archive_links' , 'reverse_links' , 'language' , 'board_defaults_language' ] ,
'highlight_options_language_subset' , 'global_limits_custom_css_filters' , 'board_defaults_filters' , 'filters' , 'archive_links' , 'ethereum_links' , ' reverse_links' , 'language' , 'board_defaults_language' ] ,
numberFields : [ 'inactive_account_action' , 'abandoned_board_action' , 'auth_level' , 'captcha_options_text_wave' , 'captcha_options_text_paint' , 'captcha_options_text_noise' ,
'captcha_options_grid_noise' , 'captcha_options_grid_edge' , 'captcha_options_generate_limit' , 'captcha_options_grid_size' , 'captcha_options_grid_image_size' ,
'captcha_options_num_distorts_min' , 'captcha_options_num_distorts_max' , 'captcha_options_distortion' , 'captcha_options_grid_icon_y_offset' , 'flood_timers_same_content_same_ip' , 'flood_timers_same_content_any_ip' ,
@ -73,6 +73,12 @@ module.exports = {
}
return false ;
} , expected : true , error : _ _ ( 'Invalid reverse image search links URL format, must be a link containing %s where the url param belongs.' ) } ,
{ result : ( ) => {
if ( req . body . ethereum _links ) {
return /https?\:\/\/[^\s<>\[\]{}|\\^]+%s[^\s<>\[\]{}|\\^]*/i . test ( req . body . ethereum _links ) ;
}
return false ;
} , expected : true , error : _ _ ( 'Invalid ethereum links URL format, must be a link containing %s where the url param belongs.' ) } ,
{ result : existsBody ( req . body . referrer _check ) ? lengthBody ( req . body . allowed _hosts , 1 ) : false , expected : false , error : _ _ ( 'Please enter at least one allowed host in the "Allowed Hosts" field when the "Referer Check" option is selected.' ) } ,
{ result : numberBody ( req . body . inactive _account _time ) , expected : true , error : _ _ ( 'Invalid inactive account time' ) } ,
{ result : numberBody ( req . body . inactive _account _action , 0 , 2 ) , expected : true , error : _ _ ( 'Inactive account action must be a number from 0-2' ) } ,