mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
parent
8b24c4f7d8
commit
926a34dbbb
10
r5dev/thirdparty/curl/strcase.c
vendored
10
r5dev/thirdparty/curl/strcase.c
vendored
@ -164,6 +164,16 @@ void Curl_strntoupper(char *dest, const char *src, size_t n)
|
||||
} while(*src++ && --n);
|
||||
}
|
||||
|
||||
/* Compare case-sensitive NUL-terminated strings, taking care of possible
|
||||
* null pointers. Return true if arguments match.
|
||||
*/
|
||||
bool Curl_safecmp(char *a, char *b)
|
||||
{
|
||||
if(a && b)
|
||||
return !strcmp(a, b);
|
||||
return !a && !b;
|
||||
}
|
||||
|
||||
/* --- public functions --- */
|
||||
|
||||
int curl_strequal(const char *first, const char *second)
|
||||
|
2
r5dev/thirdparty/curl/strcase.h
vendored
2
r5dev/thirdparty/curl/strcase.h
vendored
@ -48,4 +48,6 @@ char Curl_raw_toupper(char in);
|
||||
void Curl_strntoupper(char *dest, const char *src, size_t n);
|
||||
char Curl_raw_toupper(char in);
|
||||
|
||||
bool Curl_safecmp(char *a, char *b);
|
||||
|
||||
#endif /* HEADER_CURL_STRCASE_H */
|
||||
|
3
r5dev/thirdparty/curl/url.c
vendored
3
r5dev/thirdparty/curl/url.c
vendored
@ -3640,7 +3640,8 @@ ConnectionExists(struct Curl_easy *data,
|
||||
/* This protocol requires credentials per connection,
|
||||
so verify that we're using the same name and password as well */
|
||||
if(strcmp(needle->user, check->user) ||
|
||||
strcmp(needle->passwd, check->passwd)) {
|
||||
strcmp(needle->passwd, check->passwd) ||
|
||||
!Curl_safecmp(needle->oauth_bearer, check->oauth_bearer)) {
|
||||
/* one of them was different */
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user