Skip to content

Argument 1 in db2_connect() and db2_pconnect() can contain the connection password #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

phansys
Copy link
Contributor

@phansys phansys commented Mar 13, 2023

When passing a DSN string as argument 1 for db2_connect() and db2_pconnect(), it can contain the connection password in the PWD option.
By instance:

db2_connect(
    'DRIVER={IBM DB2 ODBC DRIVER};HOSTNAME=127.0.1;PORT=50000;DATABASE=MYDB;UID=MYUSER;PWD=SECRET;',
    null,
    null
);

@phansys phansys marked this pull request as ready for review March 13, 2023 15:28
@NattyNarwhal
Copy link
Member

It is kinda annoying that ibm_db2, like procedural ODBC, basically put SQLConnect and SQLDriverConnect semantics in the same function, but LGTM.

@NattyNarwhal NattyNarwhal merged commit 7c1458c into php:master Mar 13, 2023
@phansys phansys deleted the uncataloged branch March 13, 2023 15:53
@phansys
Copy link
Contributor Author

phansys commented Mar 13, 2023

It is kinda annoying that ibm_db2, like procedural ODBC, basically put SQLConnect and SQLDriverConnect semantics in the same function, but LGTM.

I agree. I'd like to contribute changing that, if it is possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants