Skip to content

Commit 8bdf129

Browse files
authored
S22 tech patch 1 (#21)
* Refactor administrator fetch logic in login.inc.php Refactor administrator fetching logic to process known IPs and fingerprints _after_ fetching the administrator record. Those were not arrays outside the fetch block. * Revert "Refactor administrator fetch logic in login.inc.php" This reverts commit 2d8b928. Restores the original fetch callback pattern where known_ips and known_fingerprints processing happened inside the fetch block, ensuring they are properly treated as arrays at the time of assignment. * Refactor administrator fetch logic in login.inc.php Refactor administrator fetching logic to process known IPs and fingerprints _after_ fetching the administrator record. Those were not arrays outside the fetch block.
1 parent b92f9ce commit 8bdf129

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

public_html/backend/pages/login.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
where username = '". database::input(strtolower($_POST['username'])) ."'
3131
or email = '". database::input(strtolower($_POST['username'])) ."'
3232
limit 1;"
33-
)->fetch(function($administrator){
34-
$administrator['known_ips'] = f::string_split($administrator['known_ips']);
35-
$administrator['known_fingerprints'] = f::string_split($administrator['known_fingerprints']);
36-
});
33+
)->fetch();
34+
35+
$administrator['known_ips'] = f::string_split($administrator['known_ips']);
36+
$administrator['known_fingerprints'] = f::string_split($administrator['known_fingerprints']);
3737

3838
if (!$administrator) {
3939
throw new Exception(t('error_administrator_not_found', 'The administrator could not be found in our database'));

0 commit comments

Comments
 (0)