File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,24 @@ class Connection extends BaseConnection
5353 ];
5454
5555 protected $ validDSNs = [
56- 'tns ' => '/^\(DESCRIPTION=(\(.+\)){2,}\)$/ ' , // TNS
57- // Easy Connect string (Oracle 10g+)
58- 'ec ' => '/^(\/\/)?[a-z0-9.:_-]+(:[1-9][0-9]{0,4})?(\/[a-z0-9$_]+)?(:[^\/])?(\/[a-z0-9$_]+)?$/i ' ,
59- 'in ' => '/^[a-z0-9$_]+$/i ' , // Instance name (defined in tnsnames.ora)
56+ // TNS
57+ 'tns ' => '/^\(DESCRIPTION=(\(.+\)){2,}\)$/ ' ,
58+ // Easy Connect string (Oracle 10g+).
59+ // https://docs.oracle.com/en/database/oracle/oracle-database/23/netag/configuring-naming-methods.html#GUID-36F3A17D-843C-490A-8A23-FB0FE005F8E8
60+ // [//]host[:port][/[service_name][:server_type][/instance_name]]
61+ 'ec ' => '/^
62+ (\/\/)?
63+ (\[)?[a-z0-9.:_-]+(\])? # Host or IP address
64+ (:[1-9][0-9]{0,4})? # Port
65+ (
66+ (\/)
67+ ([a-z0-9.$_]+)? # Service name
68+ (:[a-z]+)? # Server type
69+ (\/[a-z0-9$_]+)? # Instance name
70+ )?
71+ $/ix ' ,
72+ // Instance name (defined in tnsnames.ora)
73+ 'in ' => '/^[a-z0-9$_]+$/i ' ,
6074 ];
6175
6276 /**
You can’t perform that action at this time.
0 commit comments