Update for DB::IO

DB/SQL/Pgsql:
add __dbConnectionBusySocketWait for testing with loop type and socket
check wait loop for async queries. (TODO)
add parameter query method to supplement current normal query only
function

DB/IO:
Make all class variables private and add needed methods to read them.
Also add method for reset query in case for new calls.
db error/warnings are written to proper history file with timestamp,
source, etc.
Update source (where called) to show the whole method stack.
Move connection OK to method to easy switch to different connection open
for queries check type.
Never use method variable query, instead only use method parameter and
error out on not set.
All core calls reset errors and set error hash id for history.
Bug fix for insert data return array and reset said array every time a
query execution is started and not only if we have some return data to
avoid having wrong (previous query) data for a new query.
Add more error info to all erros where a separate db logging call was
done.:

ACL/Login:
Do not access DB IO cursor variable directly but use method to read
data. Fixes change for hash type
This commit is contained in:
Clemens Schwaighofer
2022-03-01 20:22:59 +09:00
parent cae6d4c372
commit 9d79dd4af4
3 changed files with 302 additions and 123 deletions

View File

@@ -439,8 +439,9 @@ class Login extends \CoreLibs\DB\IO
if (!is_array($res)) {
$this->login_error = 1009;
$this->permission_okay = false;
} elseif (!$this->cursor_ext[md5($q)]['num_rows']) {
// username is wrong, but we throw for wrong username and wrong password the same error
} elseif (empty($this->dbGetCursorExt($q, 'num_rows'))) {
// username is wrong, but we throw for wrong username
// and wrong password the same error
$this->login_error = 1010;
} else {
// if login errors is half of max errors and the last login error