Surprisingly PHP stack frames are passed as references to the error
handling code, thus changing value there leads to changing value in the
executed code.
With MySQL issuing warning about incompatible version (different runtime
library than compile time), handling this warning rewrites current stack
frame and the mysql_real_connect later sees parameters as processed by
Error class for display.
We now create copy of the stacktrace to avoid this.
Fixes#12279
Signed-off-by: Michal Čihař <michal@cihar.com>
It seems that for some PHP versions this flag is needed even though it's
not documented like this. Anyway this flag doesn't cause any harm, so
lets keep it enabled.
Issue #12293
Signed-off-by: Michal Čihař <michal@cihar.com>
The intval function does return 0 for empty string, so we really do not
have to special case here.
Issue #12279
Signed-off-by: Michal Čihař <michal@cihar.com>
The mysqli_real_connect seems to return NULL on invalid parameters, so
we need to handle it as well. This doesn't seem to be documented
anywhere.
Issue #12279
Signed-off-by: Michal Čihař <michal@cihar.com>
It is wrong for this purpose as on Windows this uses \ for both
separating parts and generating result. This fixed calculation of cookie
path on Windows.
Fixes#12249
Signed-off-by: Michal Čihař <michal@cihar.com>
The errors will include table and database name in the dump and the
error is also shown in the UI on next page.
Fixes#5555
Signed-off-by: Michal Čihař <michal@cihar.com>
If there is user error stored in session, it would be treated as session
startup error, what is wrong.
Fixes#12229
Signed-off-by: Michal Čihař <michal@cihar.com>
The arguments of called functions can be huge or cause problems on session
restore. More importantly we never need them as they are, we only need
them to display them as text, so let's store only this representation in
the session.
Fixes#12192
Signed-off-by: Michal Čihař <michal@cihar.com>
- always generate new session for login form
- always generate new session when authenticated using cookie auth
Signed-off-by: Michal Čihař <michal@cihar.com>