Skip to content

Bug: system/Database/OCI8/Connection.php fails to parse valid DSN #8984

Description

@jdpurdyvi

PHP Version

8.2

CodeIgniter4 Version

4.5.2

CodeIgniter4 Installation Method

Composer (as dependency to an existing project)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

apache

Database

Oracle

What happened?

Some valid DSN strings fail the isValidDSN() method, meaning that the $validDSNs['tsn'] regex is too strict in its check.

Steps to Reproduce

Try the DSN (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMMUNITY=TCP.world)(PROTOCOL=TCP)(Host=dbodsprod.is.colostate.edu)(Port=1521)))(CONNECT_DATA=(SERVICE_NAME=odsprod.infosys.colostate.edu)))

Expected Output

preg_match($validDSNs['tsn']) returns true which causes isValidDSN() to return true which causes Connection->connect() to return a a valid resource

Anything else?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    databaseIssues or pull requests that affect the database layer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions