Skip to content

Conversation

@SakiTakamachi
Copy link
Member

fixes #12296

This is a minimal fix. It now works even if we specify an empty string for the password.
Other modifications will be made to master.

@SakiTakamachi SakiTakamachi changed the base branch from master to PHP-8.2 September 27, 2023 04:24
@SakiTakamachi
Copy link
Member Author

@NattyNarwhal
Could you check it out?

@NattyNarwhal
Copy link
Member

NattyNarwhal commented Sep 27, 2023

What if null is passed as password? I forgot how spprintf handles that; if it doesn't like it, then an empty string would work. Just means you have to set password to an empty string if it's null. (edit: Or just do a null check and require an empty string be passed.)

I also don't know if it makes sense to do the same to UID.

@SakiTakamachi
Copy link
Member Author

Since the argument is expecting a string, I don't think null will be passed here. (Except for bugs, of course)

I think either of the empty string checks for uid is fine. There's not that much difference between the two tbh.

@SakiTakamachi
Copy link
Member Author

Maybe I should close this one. If I merge this, connections that should not specify a password will never be able to connect.

@SakiTakamachi SakiTakamachi deleted the fix/gh-12296-ignore-pwd-empty-check branch November 21, 2023 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

odbc_connect does not pass authentication information to the driver under certain conditions

2 participants