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)
|
// Custom captcha extra field (eg. charset)
|
||||||
'extra' => 'abcdefghijklmnopqrstuvwxyz',
|
'extra' => 'abcdefghijklmnopqrstuvwxyz',
|
||||||
// New thread captcha. Require solving a captcha to post a thread.
|
// 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");
|
header("Content-type: application/json");
|
||||||
$extra = $config['captcha']['native']['extra'];
|
$extra = $config['captcha']['native']['extra'];
|
||||||
$cookie = rand_string(20, $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();
|
$i->createCode();
|
||||||
ob_start();
|
ob_start();
|
||||||
$i->show();
|
$i->show();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user