Fix #19384 - varbinary equal search#19523
Fix #19384 - varbinary equal search#19523faissaloux wants to merge 6 commits intophpmyadmin:QA_5_2from
Conversation
The PR will modify the 'GetCookieName' functtion by hard coding the prefix ' __Secure-' to each cookie name when 'isHttps()' is true, Apparently the prefix will be recognise d and enforced by most browsers (ignored by the older ones).Update Config.php The raison d'aitre for this PR is contained in my issue # 18608. This PR will replace the line 953, part of the GetCookieName function : return $cookieName . ( $this->isHttps ? '_https' : '' ); with the amended line: return ( $this->isHttps() ? '__Secure-' : '’ ) . $cookieName . ( $this->isHttps() ? '_https' : ‘’ ); Signed-off-by: martin762 <martin762green@btinternet.com> Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev> Signed-off-by: faissaloux <fwahabali@gmail.com>
Signed-off-by: faissaloux <fwahabali@gmail.com>
There was a problem hiding this comment.
should it not be in the line above preg_match('@char|binary|blob|text|set|date|time|year|uuid@i', $types) ?
There was a problem hiding this comment.
Yeah you are right! I didn't see that line, I'll check it tonight.
|
But that breaks the current behaviour. What if I really do want to search for a string like I can do with all other types? |
Do you mean you need to search for a sting on a |
Yes, that should be possible by default. |
Isn't this what
Can you confirm this. |
No, that's not what this is for. This option allows you to search for an empty string. Try it, you can't enter the value because the condition will always be an empty string. |
Oh it's confusing, so this is another issue that I should fix later on. Noted! Can you give me an example where you gonna need quotes on a binary field please. |
I am not sure what you're asking but basically any text would need quotes. The |
|
So I'll add the quotes only if the inserted value is a simple string like |
|
Yeah, that could work but how will you know when it's a special value? |
Yeah exactly that's what I'm thinking about, the only idea I have now is check if the string starts with |
Signed-off-by: faissaloux <fwahabali@gmail.com>
| if ( | ||
| preg_match('@char|binary|blob|text|set|date|time|year|uuid@i', $types) | ||
| ( | ||
| preg_match('@char|binary|blob|text|set|date|time|year|uuid@i', $types) |
There was a problem hiding this comment.
this new version of the check is confusing me
There was a problem hiding this comment.
Can you elaborate.
There was a problem hiding this comment.
Yes, sorry
why was the varbinary type not added to the list ?
is there a case where varbinary is different from binary and not used in the 0x form ?
There was a problem hiding this comment.
why was the varbinary type not added to the list ?
I didn't have to add it since there is binary (substring) that detects it.
is there a case where varbinary is different from binary and not used in the 0x form ?
As @kamil-tekiela said and I tested it yes, it can be stored as normal string.
There was a problem hiding this comment.
I still don't know about this. What if I search for a string 0x? Then the search query will be broken and now you have another more serious bug. I'd rather either not change anything or create a separate option allowing the user to provide a self-quoted string/numerical value.
williamdes
left a comment
There was a problem hiding this comment.
Okay, thank you both for the review and work !


Fixes #19384
While I was investigating this issue, I have found that all ops does not work with
varbinaryas it should.In this PR I have fixed the equal op with
varbinaryfield as it's the one reported now, other ops should be fixed on other PRs.In case the value starts with
0xIn case the value is a simple string