mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-01-14 13:27:28 +00:00
add command to return a random string
This commit is contained in:
parent
c5eac169ec
commit
5949c4ed35
|
|
@ -30,6 +30,7 @@ require_once("../inc/inc.ClassController.php");
|
|||
require_once("../inc/inc.Notification.php");
|
||||
|
||||
use Seeddms\Seeddms\Session;
|
||||
use Seeddms\Seeddms\Utilities;
|
||||
|
||||
require_once("../inc/inc.ClassSession.php");
|
||||
require_once("../inc/inc.ClassPasswordStrength.php");
|
||||
|
|
@ -100,6 +101,12 @@ switch($command) {
|
|||
}
|
||||
break; /* }}} */
|
||||
|
||||
case 'randomstring': /* {{{ */
|
||||
$len = $_REQUEST["len"] ?? 16;
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(array('success'=>true, 'string'=>Utilities::makeRandomString($len)));
|
||||
break; /* }}} */
|
||||
|
||||
case 'sessioninfo': /* {{{ */
|
||||
if($user) {
|
||||
header('Content-Type: application/json');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user