mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-08 23:39:46 +01:00
allow customization of securimage by captcha config variable
This commit is contained in:
parent
50339812b6
commit
0deae76002
@ -390,7 +390,10 @@
|
||||
// Custom captcha extra field (eg. charset)
|
||||
'extra' => 'abcdefghijklmnopqrstuvwxyz',
|
||||
// New thread captcha. Require solving a captcha to post a thread.
|
||||
'new_thread_capt' => false
|
||||
'new_thread_capt' => false,
|
||||
// Securimage customization options
|
||||
// https://github.com/dapphp/securimage/blob/nextgen/examples/securimage_show_example.php#L49
|
||||
'securimage_options' => ['send_headers' => false, 'no_exit' => true]
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -22,7 +22,7 @@ switch ($mode) {
|
||||
header("Content-type: application/json");
|
||||
$extra = $config['captcha']['native']['extra'];
|
||||
$cookie = rand_string(20, $extra);
|
||||
$i = new Securimage(['send_headers' => false, 'no_exit' => true]);
|
||||
$i = new Securimage($config['captcha']['native']['securimage_options']);
|
||||
$i->createCode();
|
||||
ob_start();
|
||||
$i->show();
|
||||
|
Loading…
x
Reference in New Issue
Block a user