diff --git a/op/op.Ajax.php b/op/op.Ajax.php index bcf3f2da7..9a3c07290 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -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');