[MDEV-32525] Server startup fails to validate invalid redirect_url Created: 2023-10-20  Updated: 2023-10-26  Resolved: 2023-10-25

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 11.3
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Ramesh Sivaraman Assignee: Yuchen Pei
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-15935 Connection Redirection Mechanism in M... Closed
Problem/Incident
is caused by MDEV-15935 Connection Redirection Mechanism in M... Closed

 Description   

Server does not allow to set invalid URL with SET GLOBAL statement, but this validation is not happening when we pass invalid URL in startup option.

11.3.0-dbg>set global redirect_url="mariadbaaa://test";
ERROR 1231 (42000): Variable 'redirect_url' can't be set to the value of 'mariadbaaa://test'
11.3.0-dbg>
 
11.3.0-dbg>set global redirect_url="mariadb://test:6666666";
ERROR 1231 (42000): Variable 'redirect_url' can't be set to the value of 'mariadb://test:6666666'
11.3.0-dbg>

server startup command --redirect_url="mariadbaaa://test" or --redirect_url="mariadb://test:6666666"

11.3.0-dbg>select @@redirect_url;
+-------------------+
| @@redirect_url    |
+-------------------+
| mariadbaaa://test |
+-------------------+
1 row in set (0.000 sec)
 
11.3.0-dbg>
 
11.3.0-dbg>select @@redirect_url;
+------------------------+
| @@redirect_url         |
+------------------------+
| mariadb://test:6666666 |
+------------------------+
1 row in set (0.000 sec)
 
11.3.0-dbg>



 Comments   
Comment by Yuchen Pei [ 2023-10-24 ]

Hi serg, ptal thanks

bb-11.3-mdev-15935 3a3bb0771a3abc0ad88fee09ab7eec69935dfb79
MDEV-32525 Validate --redirect_url supplied as server flag
 
Like sql_mode, we factor out of ON_CHECK function for export, to be
used in get_options() during server startup, for validation of
--redirect_url value.

Comment by Sergei Golubchik [ 2023-10-25 ]

3a3bb0771a3 is ok to push, thanks!

Comment by Yuchen Pei [ 2023-10-25 ]

Thanks for the review serg, will ask for this to be tested as a part of MDEV-15935

Generated at Thu Feb 08 10:32:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.