mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-30 17:17:22 +08:00
api per_page limit + revert login username case insensitive
This commit is contained in:
@@ -23,7 +23,12 @@ class BaseRepository
|
|||||||
|
|
||||||
protected function getPerPageFromRequest(Request $request)
|
protected function getPerPageFromRequest(Request $request)
|
||||||
{
|
{
|
||||||
return $request->get('per_page');
|
$perPage = $request->get('per_page');
|
||||||
|
if ($perPage && $perPage > 100) {
|
||||||
|
do_log("per_page: $perPage > 100", "warning");
|
||||||
|
$perPage = 100;
|
||||||
|
}
|
||||||
|
return $perPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function handleAnonymous($username, $user, User $authenticator, Torrent $torrent = null)
|
protected function handleAnonymous($username, $user, User $authenticator, Torrent $torrent = null)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ if ($useChallengeResponse) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = sql_query("SELECT id, passhash, secret, auth_key, enabled, status, two_step_secret, lang FROM users WHERE BINARY username = " . sqlesc($username));
|
$res = sql_query("SELECT id, passhash, secret, auth_key, enabled, status, two_step_secret, lang FROM users WHERE username = " . sqlesc($username));
|
||||||
$row = mysql_fetch_array($res);
|
$row = mysql_fetch_array($res);
|
||||||
|
|
||||||
if (!$row)
|
if (!$row)
|
||||||
|
|||||||
Reference in New Issue
Block a user