mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:03:40 +03:00
curl.h: remove CURLPROTO_MQTTS from the public header
- the value collided with the internal one used for WebSocket - we add all new ones as internal bits - bump to 64-bit internal type - introduce new define for setting all protocols (CURLPROTO_64ALL) Reported by Codex Security Closes #20798
This commit is contained in:
parent
3d4a701233
commit
ad58e07b54
7 changed files with 12 additions and 16 deletions
|
|
@ -2365,7 +2365,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
|
|||
}
|
||||
else
|
||||
/* make a NULL argument reset to default */
|
||||
s->allowed_protocols = (curl_prot_t)CURLPROTO_ALL;
|
||||
s->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL;
|
||||
break;
|
||||
case CURLOPT_REDIR_PROTOCOLS_STR:
|
||||
if(ptr) {
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ void Curl_init_userdefined(struct Curl_easy *data)
|
|||
#endif
|
||||
|
||||
set->new_file_perms = 0644; /* Default permissions */
|
||||
set->allowed_protocols = (curl_prot_t) CURLPROTO_ALL;
|
||||
set->allowed_protocols = (curl_prot_t) CURLPROTO_64ALL;
|
||||
set->redir_protocols = CURLPROTO_REDIR;
|
||||
|
||||
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
|
||||
|
|
|
|||
|
|
@ -74,18 +74,15 @@
|
|||
#define CURLPROTO_WSS 0L
|
||||
#endif
|
||||
|
||||
#define CURLPROTO_MQTTS (1LL << 32)
|
||||
|
||||
#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff)
|
||||
|
||||
/* the default protocols accepting a redirect to */
|
||||
#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
|
||||
CURLPROTO_FTPS)
|
||||
|
||||
/* This should be undefined once we need bit 32 or higher */
|
||||
#define PROTO_TYPE_SMALL
|
||||
|
||||
#ifndef PROTO_TYPE_SMALL
|
||||
typedef curl_off_t curl_prot_t;
|
||||
#else
|
||||
typedef uint32_t curl_prot_t;
|
||||
#endif
|
||||
|
||||
/* This mask is for all the old protocols that are provided and defined in the
|
||||
public header and shall exclude protocols added since which are not exposed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue