Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
55b7b756
Commit
55b7b756
authored
Apr 29, 2010
by
Davi Arnaut
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge.
parents
49318af3
14ccbeb4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
include/mysql_com.h
include/mysql_com.h
+10
-0
sql/net_serv.cc
sql/net_serv.cc
+4
-0
sql/sql_connect.cc
sql/sql_connect.cc
+7
-0
No files found.
include/mysql_com.h
View file @
55b7b756
...
...
@@ -277,6 +277,16 @@ typedef struct st_net {
/** Client library sqlstate buffer. Set along with the error message. */
char
sqlstate
[
SQLSTATE_LENGTH
+
1
];
void
*
extension
;
#if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
/*
Controls whether a big packet should be skipped.
Initially set to FALSE by default. Unauthenticated sessions must have
this set to FALSE so that the server can't be tricked to read packets
indefinitely.
*/
my_bool
skip_big_packet
;
#endif
}
NET
;
...
...
sql/net_serv.cc
View file @
55b7b756
...
...
@@ -136,6 +136,9 @@ my_bool my_net_init(NET *net, Vio* vio)
#else
net
->
query_cache_query
=
0
;
#endif
#if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
net
->
skip_big_packet
=
FALSE
;
#endif
if
(
vio
!=
0
)
/* If real connection */
{
...
...
@@ -949,6 +952,7 @@ my_real_read(NET *net, size_t *complen)
{
#if defined(MYSQL_SERVER) && !defined(NO_ALARM)
if
(
!
net
->
compress
&&
net
->
skip_big_packet
&&
!
my_net_skip_rest
(
net
,
(
uint32
)
len
,
&
alarmed
,
&
alarm_buff
))
net
->
error
=
3
;
/* Successfully skiped packet */
#endif
...
...
sql/sql_connect.cc
View file @
55b7b756
...
...
@@ -471,6 +471,13 @@ check_user(THD *thd, enum enum_server_command command,
}
my_ok
(
thd
);
thd
->
password
=
test
(
passwd_len
);
// remember for error messages
/*
Allow the network layer to skip big packets. Although a malicious
authenticated session might use this to trick the server to read
big packets indefinitely, this is a previously established behavior
that needs to be preserved as to not break backwards compatibility.
*/
thd
->
net
.
skip_big_packet
=
TRUE
;
/* Ready to handle queries */
DBUG_RETURN
(
0
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment