1CURLOPT_DISALLOW_USERNAME_INc_uUrRlL_(e3a)sy_setoptCoUpRtLiOoPnTs_DISALLOW_USERNAME_IN_URL(3)
2
3
4

NAME

6       CURLOPT_DISALLOW_USERNAME_IN_URL  - disallow specifying username in the
7       URL
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DISALLOW_USERNAME_IN_URL,
13                                 long disallow);
14

DESCRIPTION

16       A long parameter set to 1 tells the library to not allow URLs that  in‐
17       clude a username.
18

DEFAULT

20       0 (disabled) - user names are allowed by default.
21

PROTOCOLS

23       Several
24

EXAMPLE

26       CURL *curl = curl_easy_init();
27       if(curl) {
28
29         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
30         curl_easy_setopt(curl, CURLOPT_DISALLOW_USERNAME_IN_URL, 1L);
31
32         curl_easy_perform(curl);
33       }
34

AVAILABILITY

36       Added in 7.61.0
37

RETURN VALUE

39       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
40       if not.
41
42       curl_easy_perform() will return CURLE_LOGIN_DENIED if  this  option  is
43       enabled and a URL containing a username is specified.
44

SEE ALSO

46       libcurl-security(3), ,CURLOPT_PROTOCOLS(3)
47
48
49
50libcurl 7.85.0                   May 17, 202C2URLOPT_DISALLOW_USERNAME_IN_URL(3)
Impressum