idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
5,400 | const char *get_reason(unsigned int status)
{
switch (status) {
case 100: return "Continue";
case 101: return "Switching Protocols";
case 102: return "Processing";
case 200: return "OK";
case 201: return "Created";
case 202: return "Accepted";
case 203: return "Non-Authoritative Information";
case 204: return ... | +Info | 0 | const char *get_reason(unsigned int status)
{
switch (status) {
case 100: return "Continue";
case 101: return "Switching Protocols";
case 102: return "Processing";
case 200: return "OK";
case 201: return "Created";
case 202: return "Accepted";
case 203: return "Non-Authoritative Information";
case 204: return ... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,401 | enum act_return http_action_reject(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
channel_abort(&s->req);
channel_abort(&s->res);
s->req.analysers = 0;
s->res.analysers = 0;
HA_ATOMIC_ADD(&s->be->be_counters.denied_req, 1);
HA_ATOM... | +Info | 0 | enum act_return http_action_reject(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
channel_abort(&s->req);
channel_abort(&s->res);
s->req.analysers = 0;
s->res.analysers = 0;
HA_ATOMIC_ADD(&s->be->be_counters.denied_req, 1);
HA_ATOM... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,402 | enum act_return http_action_req_capture(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
struct sample *key;
struct cap_hdr *h = rule->arg.cap.hdr;
char **cap = s->req_cap;
int len;
key = sample_fetch_as_type(s->be, sess, s, SMP_... | +Info | 0 | enum act_return http_action_req_capture(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
struct sample *key;
struct cap_hdr *h = rule->arg.cap.hdr;
char **cap = s->req_cap;
int len;
key = sample_fetch_as_type(s->be, sess, s, SMP_... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,403 | enum act_return http_action_req_capture_by_id(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
struct sample *key;
struct cap_hdr *h;
char **cap = s->req_cap;
struct proxy *fe = strm_fe(s);
int len;
int i;
/* Look for the... | +Info | 0 | enum act_return http_action_req_capture_by_id(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
struct sample *key;
struct cap_hdr *h;
char **cap = s->req_cap;
struct proxy *fe = strm_fe(s);
int len;
int i;
/* Look for the... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,404 | enum act_return http_action_res_capture_by_id(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
struct sample *key;
struct cap_hdr *h;
char **cap = s->res_cap;
struct proxy *fe = strm_fe(s);
int len;
int i;
/* Look for the... | +Info | 0 | enum act_return http_action_res_capture_by_id(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
struct sample *key;
struct cap_hdr *h;
char **cap = s->res_cap;
struct proxy *fe = strm_fe(s);
int len;
int i;
/* Look for the... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,405 | enum act_return http_action_set_req_line(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
struct chunk *replace;
enum act_return ret = ACT_RET_ERR;
replace = alloc_trash_chunk();
if (!replace)
goto leave;
/* If we have to cre... | +Info | 0 | enum act_return http_action_set_req_line(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
struct chunk *replace;
enum act_return ret = ACT_RET_ERR;
replace = alloc_trash_chunk();
if (!replace)
goto leave;
/* If we have to cre... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,406 | void http_adjust_conn_mode(struct stream *s, struct http_txn *txn, struct http_msg *msg)
{
struct proxy *fe = strm_fe(s);
int tmp = TX_CON_WANT_KAL;
if (!((fe->options2|s->be->options2) & PR_O2_FAKE_KA)) {
if ((fe->options & PR_O_HTTP_MODE) == PR_O_HTTP_TUN ||
(s->be->options & PR_O_HTTP_MODE) == PR_O_HTTP_... | +Info | 0 | void http_adjust_conn_mode(struct stream *s, struct http_txn *txn, struct http_msg *msg)
{
struct proxy *fe = strm_fe(s);
int tmp = TX_CON_WANT_KAL;
if (!((fe->options2|s->be->options2) & PR_O2_FAKE_KA)) {
if ((fe->options & PR_O_HTTP_MODE) == PR_O_HTTP_TUN ||
(s->be->options & PR_O_HTTP_MODE) == PR_O_HTTP_... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,407 | struct http_txn *http_alloc_txn(struct stream *s)
{
struct http_txn *txn = s->txn;
if (txn)
return txn;
txn = pool_alloc(pool_head_http_txn);
if (!txn)
return txn;
txn->hdr_idx.size = global.tune.max_http_hdr;
txn->hdr_idx.v = pool_alloc(pool_head_hdr_idx);
if (!txn->hdr_idx.v) {
pool_free(pool_head_... | +Info | 0 | struct http_txn *http_alloc_txn(struct stream *s)
{
struct http_txn *txn = s->txn;
if (txn)
return txn;
txn = pool_alloc(pool_head_http_txn);
if (!txn)
return txn;
txn->hdr_idx.size = global.tune.max_http_hdr;
txn->hdr_idx.v = pool_alloc(pool_head_hdr_idx);
if (!txn->hdr_idx.v) {
pool_free(pool_head_... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,408 | static int http_apply_redirect_rule(struct redirect_rule *rule, struct stream *s, struct http_txn *txn)
{
struct http_msg *req = &txn->req;
struct http_msg *res = &txn->rsp;
const char *msg_fmt;
struct chunk *chunk;
int ret = 0;
chunk = alloc_trash_chunk();
if (!chunk)
goto leave;
/* build redirect message ... | +Info | 0 | static int http_apply_redirect_rule(struct redirect_rule *rule, struct stream *s, struct http_txn *txn)
{
struct http_msg *req = &txn->req;
struct http_msg *res = &txn->rsp;
const char *msg_fmt;
struct chunk *chunk;
int ret = 0;
chunk = alloc_trash_chunk();
if (!chunk)
goto leave;
/* build redirect message ... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,409 | void http_capture_bad_message(struct proxy *proxy, struct error_snapshot *es, struct stream *s,
struct http_msg *msg,
enum h1_state state, struct proxy *other_end)
{
struct session *sess = strm_sess(s);
struct channel *chn = msg->chn;
int len1, len2;
HA_SPIN_LOCK(PROXY_LOCK, ... | +Info | 0 | void http_capture_bad_message(struct proxy *proxy, struct error_snapshot *es, struct stream *s,
struct http_msg *msg,
enum h1_state state, struct proxy *other_end)
{
struct session *sess = strm_sess(s);
struct channel *chn = msg->chn;
int len1, len2;
HA_SPIN_LOCK(PROXY_LOCK, ... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,410 | void http_end_txn(struct stream *s)
{
struct http_txn *txn = s->txn;
struct proxy *fe = strm_fe(s);
/* these ones will have been dynamically allocated */
pool_free(pool_head_requri, txn->uri);
pool_free(pool_head_capture, txn->cli_cookie);
pool_free(pool_head_capture, txn->srv_cookie);
pool_free(pool_head_uniqu... | +Info | 0 | void http_end_txn(struct stream *s)
{
struct http_txn *txn = s->txn;
struct proxy *fe = strm_fe(s);
/* these ones will have been dynamically allocated */
pool_free(pool_head_requri, txn->uri);
pool_free(pool_head_capture, txn->cli_cookie);
pool_free(pool_head_capture, txn->srv_cookie);
pool_free(pool_head_uniqu... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,411 | void http_end_txn_clean_session(struct stream *s)
{
int prev_status = s->txn->status;
struct proxy *fe = strm_fe(s);
struct proxy *be = s->be;
struct conn_stream *cs;
struct connection *srv_conn;
struct server *srv;
unsigned int prev_flags = s->txn->flags;
/* FIXME: We need a more portable way of releasing a b... | +Info | 0 | void http_end_txn_clean_session(struct stream *s)
{
int prev_status = s->txn->status;
struct proxy *fe = strm_fe(s);
struct proxy *be = s->be;
struct conn_stream *cs;
struct connection *srv_conn;
struct server *srv;
unsigned int prev_flags = s->txn->flags;
/* FIXME: We need a more portable way of releasing a b... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,412 | int http_find_full_header2(const char *name, int len,
char *sol, struct hdr_idx *idx,
struct hdr_ctx *ctx)
{
char *eol, *sov;
int cur_idx, old_idx;
cur_idx = ctx->idx;
if (cur_idx) {
/* We have previously returned a header, let's search another one */
sol =... | +Info | 0 | int http_find_full_header2(const char *name, int len,
char *sol, struct hdr_idx *idx,
struct hdr_ctx *ctx)
{
char *eol, *sov;
int cur_idx, old_idx;
cur_idx = ctx->idx;
if (cur_idx) {
/* We have previously returned a header, let's search another one */
sol =... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,413 | int http_find_header(const char *name,
char *sol, struct hdr_idx *idx,
struct hdr_ctx *ctx)
{
return http_find_header2(name, strlen(name), sol, idx, ctx);
}
| +Info | 0 | int http_find_header(const char *name,
char *sol, struct hdr_idx *idx,
struct hdr_ctx *ctx)
{
return http_find_header2(name, strlen(name), sol, idx, ctx);
}
| @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,414 | int http_find_next_header(char *sol, struct hdr_idx *idx, struct hdr_ctx *ctx)
{
char *eol, *sov;
int cur_idx, old_idx;
int len;
cur_idx = ctx->idx;
if (cur_idx) {
/* We have previously returned a header, let's search another one */
sol = ctx->line;
eol = sol + idx->v[cur_idx].len;
goto next_hdr;
}
/* ... | +Info | 0 | int http_find_next_header(char *sol, struct hdr_idx *idx, struct hdr_ctx *ctx)
{
char *eol, *sov;
int cur_idx, old_idx;
int len;
cur_idx = ctx->idx;
if (cur_idx) {
/* We have previously returned a header, let's search another one */
sol = ctx->line;
eol = sol + idx->v[cur_idx].len;
goto next_hdr;
}
/* ... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,415 | unsigned int http_get_fhdr(const struct http_msg *msg, const char *hname, int hlen,
struct hdr_idx *idx, int occ,
struct hdr_ctx *ctx, char **vptr, int *vlen)
{
struct hdr_ctx local_ctx;
char *ptr_hist[MAX_HDR_HISTORY];
int len_hist[MAX_HDR_HISTORY];
unsigned int hist_ptr;
int found;
if (!ctx) {
lo... | +Info | 0 | unsigned int http_get_fhdr(const struct http_msg *msg, const char *hname, int hlen,
struct hdr_idx *idx, int occ,
struct hdr_ctx *ctx, char **vptr, int *vlen)
{
struct hdr_ctx local_ctx;
char *ptr_hist[MAX_HDR_HISTORY];
int len_hist[MAX_HDR_HISTORY];
unsigned int hist_ptr;
int found;
if (!ctx) {
lo... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,416 | unsigned int http_get_hdr(const struct http_msg *msg, const char *hname, int hlen,
struct hdr_idx *idx, int occ,
struct hdr_ctx *ctx, char **vptr, int *vlen)
{
struct hdr_ctx local_ctx;
char *ptr_hist[MAX_HDR_HISTORY];
int len_hist[MAX_HDR_HISTORY];
unsigned int hist_ptr;
int found;
if (!ctx) {
local... | +Info | 0 | unsigned int http_get_hdr(const struct http_msg *msg, const char *hname, int hlen,
struct hdr_idx *idx, int occ,
struct hdr_ctx *ctx, char **vptr, int *vlen)
{
struct hdr_ctx local_ctx;
char *ptr_hist[MAX_HDR_HISTORY];
int len_hist[MAX_HDR_HISTORY];
unsigned int hist_ptr;
int found;
if (!ctx) {
local... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,417 | char *http_get_path(struct http_txn *txn)
{
char *ptr, *end;
ptr = txn->req.chn->buf->p + txn->req.sl.rq.u;
end = ptr + txn->req.sl.rq.u_l;
if (ptr >= end)
return NULL;
/* RFC7230, par. 2.7 :
* Request-URI = "*" | absuri | abspath | authority
*/
if (*ptr == '*')
return NULL;
if (isalpha((unsigned ch... | +Info | 0 | char *http_get_path(struct http_txn *txn)
{
char *ptr, *end;
ptr = txn->req.chn->buf->p + txn->req.sl.rq.u;
end = ptr + txn->req.sl.rq.u_l;
if (ptr >= end)
return NULL;
/* RFC7230, par. 2.7 :
* Request-URI = "*" | absuri | abspath | authority
*/
if (*ptr == '*')
return NULL;
if (isalpha((unsigned ch... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,418 | http_get_path_from_string(char *str)
{
char *ptr = str;
/* RFC2616, par. 5.1.2 :
* Request-URI = "*" | absuri | abspath | authority
*/
if (*ptr == '*')
return NULL;
if (isalpha((unsigned char)*ptr)) {
/* this is a scheme as described by RFC3986, par. 3.1 */
ptr++;
while (isalnum((unsigned char)*ptr) ... | +Info | 0 | http_get_path_from_string(char *str)
{
char *ptr = str;
/* RFC2616, par. 5.1.2 :
* Request-URI = "*" | absuri | abspath | authority
*/
if (*ptr == '*')
return NULL;
if (isalpha((unsigned char)*ptr)) {
/* this is a scheme as described by RFC3986, par. 3.1 */
ptr++;
while (isalnum((unsigned char)*ptr) ... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,419 | static const int http_get_status_idx(unsigned int status)
{
switch (status) {
case 200: return HTTP_ERR_200;
case 400: return HTTP_ERR_400;
case 403: return HTTP_ERR_403;
case 405: return HTTP_ERR_405;
case 408: return HTTP_ERR_408;
case 425: return HTTP_ERR_425;
case 429: return HTTP_ERR_429;
case 500: return... | +Info | 0 | static const int http_get_status_idx(unsigned int status)
{
switch (status) {
case 200: return HTTP_ERR_200;
case 400: return HTTP_ERR_400;
case 403: return HTTP_ERR_403;
case 405: return HTTP_ERR_405;
case 408: return HTTP_ERR_408;
case 425: return HTTP_ERR_425;
case 429: return HTTP_ERR_429;
case 500: return... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,420 | int http_handle_stats(struct stream *s, struct channel *req)
{
struct stats_admin_rule *stats_admin_rule;
struct stream_interface *si = &s->si[1];
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &txn->req;
struct uri_auth *uri_auth = s->be->uri_auth;
const char *uri, *h, *lo... | +Info | 0 | int http_handle_stats(struct stream *s, struct channel *req)
{
struct stats_admin_rule *stats_admin_rule;
struct stream_interface *si = &s->si[1];
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &txn->req;
struct uri_auth *uri_auth = s->be->uri_auth;
const char *uri, *h, *lo... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,421 | int http_header_add_tail(struct http_msg *msg, struct hdr_idx *hdr_idx, const char *text)
{
int bytes, len;
len = strlen(text);
bytes = buffer_insert_line2(msg->chn->buf, msg->chn->buf->p + msg->eoh, text, len);
if (!bytes)
return -1;
http_msg_move_end(msg, bytes);
return hdr_idx_add(len, 1, hdr_idx, hdr_idx->... | +Info | 0 | int http_header_add_tail(struct http_msg *msg, struct hdr_idx *hdr_idx, const char *text)
{
int bytes, len;
len = strlen(text);
bytes = buffer_insert_line2(msg->chn->buf, msg->chn->buf->p + msg->eoh, text, len);
if (!bytes)
return -1;
http_msg_move_end(msg, bytes);
return hdr_idx_add(len, 1, hdr_idx, hdr_idx->... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,422 | int http_header_add_tail2(struct http_msg *msg,
struct hdr_idx *hdr_idx, const char *text, int len)
{
int bytes;
bytes = buffer_insert_line2(msg->chn->buf, msg->chn->buf->p + msg->eoh, text, len);
if (!bytes)
return -1;
http_msg_move_end(msg, bytes);
return hdr_idx_add(len, 1, hdr_idx,... | +Info | 0 | int http_header_add_tail2(struct http_msg *msg,
struct hdr_idx *hdr_idx, const char *text, int len)
{
int bytes;
bytes = buffer_insert_line2(msg->chn->buf, msg->chn->buf->p + msg->eoh, text, len);
if (!bytes)
return -1;
http_msg_move_end(msg, bytes);
return hdr_idx_add(len, 1, hdr_idx,... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,423 | int http_header_match2(const char *hdr, const char *end,
const char *name, int len)
{
const char *val;
if (hdr + len >= end)
return 0;
if (hdr[len] != ':')
return 0;
if (strncasecmp(hdr, name, len) != 0)
return 0;
val = hdr + len + 1;
while (val < end && HTTP_IS_SPHT(*val))
val++;
if ((val >= e... | +Info | 0 | int http_header_match2(const char *hdr, const char *end,
const char *name, int len)
{
const char *val;
if (hdr + len >= end)
return 0;
if (hdr[len] != ':')
return 0;
if (strncasecmp(hdr, name, len) != 0)
return 0;
val = hdr + len + 1;
while (val < end && HTTP_IS_SPHT(*val))
val++;
if ((val >= e... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,424 | http_msg_forward_body(struct stream *s, struct http_msg *msg)
{
struct channel *chn = msg->chn;
int ret;
/* Here we have the guarantee to be in HTTP_MSG_DATA or HTTP_MSG_ENDING state */
if (msg->msg_state == HTTP_MSG_ENDING)
goto ending;
/* Neither content-length, nor transfer-encoding was found, so we must
... | +Info | 0 | http_msg_forward_body(struct stream *s, struct http_msg *msg)
{
struct channel *chn = msg->chn;
int ret;
/* Here we have the guarantee to be in HTTP_MSG_DATA or HTTP_MSG_ENDING state */
if (msg->msg_state == HTTP_MSG_ENDING)
goto ending;
/* Neither content-length, nor transfer-encoding was found, so we must
... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,425 | http_msg_forward_chunked_body(struct stream *s, struct http_msg *msg)
{
struct channel *chn = msg->chn;
unsigned int chunk;
int ret;
/* Here we have the guarantee to be in one of the following state:
* HTTP_MSG_DATA, HTTP_MSG_CHUNK_SIZE, HTTP_MSG_CHUNK_CRLF,
* HTTP_MSG_TRAILERS or HTTP_MSG_ENDING. */
switch... | +Info | 0 | http_msg_forward_chunked_body(struct stream *s, struct http_msg *msg)
{
struct channel *chn = msg->chn;
unsigned int chunk;
int ret;
/* Here we have the guarantee to be in one of the following state:
* HTTP_MSG_DATA, HTTP_MSG_CHUNK_SIZE, HTTP_MSG_CHUNK_CRLF,
* HTTP_MSG_TRAILERS or HTTP_MSG_ENDING. */
switch... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,426 | void http_parse_connection_header(struct http_txn *txn, struct http_msg *msg, int to_del)
{
struct hdr_ctx ctx;
const char *hdr_val = "Connection";
int hdr_len = 10;
if (txn->flags & TX_HDR_CONN_PRS)
return;
if (unlikely(txn->flags & TX_USE_PX_CONN)) {
hdr_val = "Proxy-Connection";
hdr_len = 16;
}
ctx.i... | +Info | 0 | void http_parse_connection_header(struct http_txn *txn, struct http_msg *msg, int to_del)
{
struct hdr_ctx ctx;
const char *hdr_val = "Connection";
int hdr_len = 10;
if (txn->flags & TX_HDR_CONN_PRS)
return;
if (unlikely(txn->flags & TX_USE_PX_CONN)) {
hdr_val = "Proxy-Connection";
hdr_len = 16;
}
ctx.i... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,427 | struct redirect_rule *http_parse_redirect_rule(const char *file, int linenum, struct proxy *curproxy,
const char **args, char **errmsg, int use_fmt, int dir)
{
struct redirect_rule *rule;
int cur_arg;
int type = REDIRECT_TYPE_NONE;
int code = 302;
const char *destinat... | +Info | 0 | struct redirect_rule *http_parse_redirect_rule(const char *file, int linenum, struct proxy *curproxy,
const char **args, char **errmsg, int use_fmt, int dir)
{
struct redirect_rule *rule;
int cur_arg;
int type = REDIRECT_TYPE_NONE;
int code = 302;
const char *destinat... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,428 | int http_process_req_common(struct stream *s, struct channel *req, int an_bit, struct proxy *px)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &txn->req;
struct redirect_rule *rule;
struct cond_wordlist *wl;
enum rule_result verdict;
int deny_status = HTTP_ERR_403;
stru... | +Info | 0 | int http_process_req_common(struct stream *s, struct channel *req, int an_bit, struct proxy *px)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &txn->req;
struct redirect_rule *rule;
struct cond_wordlist *wl;
enum rule_result verdict;
int deny_status = HTTP_ERR_403;
stru... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,429 | int http_process_request(struct stream *s, struct channel *req, int an_bit)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &txn->req;
struct connection *cli_conn = objt_conn(strm_sess(s)->origin);
if (unlikely(msg->msg_state < HTTP_MSG_BODY)) {
/* we need more data */
... | +Info | 0 | int http_process_request(struct stream *s, struct channel *req, int an_bit)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &txn->req;
struct connection *cli_conn = objt_conn(strm_sess(s)->origin);
if (unlikely(msg->msg_state < HTTP_MSG_BODY)) {
/* we need more data */
... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,430 | int http_process_res_common(struct stream *s, struct channel *rep, int an_bit, struct proxy *px)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &txn->rsp;
struct proxy *cur_proxy;
struct cond_wordlist *wl;
enum rule_result ret = HTTP_RULE_RES_CONT;
DPRINTF(stderr,"[%u] %... | +Info | 0 | int http_process_res_common(struct stream *s, struct channel *rep, int an_bit, struct proxy *px)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &txn->rsp;
struct proxy *cur_proxy;
struct cond_wordlist *wl;
enum rule_result ret = HTTP_RULE_RES_CONT;
DPRINTF(stderr,"[%u] %... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,431 | int http_process_tarpit(struct stream *s, struct channel *req, int an_bit)
{
struct http_txn *txn = s->txn;
/* This connection is being tarpitted. The CLIENT side has
* already set the connect expiration date to the right
* timeout. We just have to check that the client is still
* there and that the timeout ha... | +Info | 0 | int http_process_tarpit(struct stream *s, struct channel *req, int an_bit)
{
struct http_txn *txn = s->txn;
/* This connection is being tarpitted. The CLIENT side has
* already set the connect expiration date to the right
* timeout. We just have to check that the client is still
* there and that the timeout ha... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,432 | int http_remove_header2(struct http_msg *msg, struct hdr_idx *idx, struct hdr_ctx *ctx)
{
int cur_idx = ctx->idx;
char *sol = ctx->line;
struct hdr_idx_elem *hdr;
int delta, skip_comma;
if (!cur_idx)
return 0;
hdr = &idx->v[cur_idx];
if (sol[ctx->del] == ':' && ctx->val + ctx->vlen + ctx->tws == hdr->len) {
... | +Info | 0 | int http_remove_header2(struct http_msg *msg, struct hdr_idx *idx, struct hdr_ctx *ctx)
{
int cur_idx = ctx->idx;
char *sol = ctx->line;
struct hdr_idx_elem *hdr;
int delta, skip_comma;
if (!cur_idx)
return 0;
hdr = &idx->v[cur_idx];
if (sol[ctx->del] == ':' && ctx->val + ctx->vlen + ctx->tws == hdr->len) {
... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,433 | int http_replace_req_line(int action, const char *replace, int len,
struct proxy *px, struct stream *s)
{
struct http_txn *txn = s->txn;
char *cur_ptr, *cur_end;
int offset = 0;
int delta;
switch (action) {
case 0: // method
cur_ptr = s->req.buf->p;
cur_end = cur_ptr + txn->req.sl.r... | +Info | 0 | int http_replace_req_line(int action, const char *replace, int len,
struct proxy *px, struct stream *s)
{
struct http_txn *txn = s->txn;
char *cur_ptr, *cur_end;
int offset = 0;
int delta;
switch (action) {
case 0: // method
cur_ptr = s->req.buf->p;
cur_end = cur_ptr + txn->req.sl.r... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,434 | http_req_get_intercept_rule(struct proxy *px, struct list *rules, struct stream *s, int *deny_status)
{
struct session *sess = strm_sess(s);
struct http_txn *txn = s->txn;
struct connection *cli_conn;
struct act_rule *rule;
struct hdr_ctx ctx;
const char *auth_realm;
int act_flags = 0;
int len;
/* If "the cur... | +Info | 0 | http_req_get_intercept_rule(struct proxy *px, struct list *rules, struct stream *s, int *deny_status)
{
struct session *sess = strm_sess(s);
struct http_txn *txn = s->txn;
struct connection *cli_conn;
struct act_rule *rule;
struct hdr_ctx ctx;
const char *auth_realm;
int act_flags = 0;
int len;
/* If "the cur... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,435 | int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &s->txn->req;
int ret;
DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
now_ms, __FUNCTION__,
s,
re... | +Info | 0 | int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &s->txn->req;
int ret;
DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
now_ms, __FUNCTION__,
s,
re... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,436 | http_res_get_intercept_rule(struct proxy *px, struct list *rules, struct stream *s)
{
struct session *sess = strm_sess(s);
struct http_txn *txn = s->txn;
struct connection *cli_conn;
struct act_rule *rule;
struct hdr_ctx ctx;
int act_flags = 0;
/* If "the current_rule_list" match the executed rule list, we are ... | +Info | 0 | http_res_get_intercept_rule(struct proxy *px, struct list *rules, struct stream *s)
{
struct session *sess = strm_sess(s);
struct http_txn *txn = s->txn;
struct connection *cli_conn;
struct act_rule *rule;
struct hdr_ctx ctx;
int act_flags = 0;
/* If "the current_rule_list" match the executed rule list, we are ... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,437 | void http_reset_txn(struct stream *s)
{
http_end_txn(s);
http_init_txn(s);
/* reinitialise the current rule list pointer to NULL. We are sure that
* any rulelist match the NULL pointer.
*/
s->current_rule_list = NULL;
s->be = strm_fe(s);
s->logs.logwait = strm_fe(s)->to_log;
s->logs.level = 0;
stream_del_... | +Info | 0 | void http_reset_txn(struct stream *s)
{
http_end_txn(s);
http_init_txn(s);
/* reinitialise the current rule list pointer to NULL. We are sure that
* any rulelist match the NULL pointer.
*/
s->current_rule_list = NULL;
s->be = strm_fe(s);
s->logs.logwait = strm_fe(s)->to_log;
s->logs.level = 0;
stream_del_... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,438 | int http_response_forward_body(struct stream *s, struct channel *res, int an_bit)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &s->txn->rsp;
int ret;
DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
now_ms, __FUNCTION__,
s,
r... | +Info | 0 | int http_response_forward_body(struct stream *s, struct channel *res, int an_bit)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &s->txn->rsp;
int ret;
DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
now_ms, __FUNCTION__,
s,
r... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,439 | void http_resync_states(struct stream *s)
{
struct http_txn *txn = s->txn;
#ifdef DEBUG_FULL
int old_req_state = txn->req.msg_state;
int old_res_state = txn->rsp.msg_state;
#endif
http_sync_req_state(s);
while (1) {
if (!http_sync_res_state(s))
break;
if (!http_sync_req_state(s))
break;
}
DPRINTF(std... | +Info | 0 | void http_resync_states(struct stream *s)
{
struct http_txn *txn = s->txn;
#ifdef DEBUG_FULL
int old_req_state = txn->req.msg_state;
int old_res_state = txn->rsp.msg_state;
#endif
http_sync_req_state(s);
while (1) {
if (!http_sync_res_state(s))
break;
if (!http_sync_req_state(s))
break;
}
DPRINTF(std... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,440 | void http_return_srv_error(struct stream *s, struct stream_interface *si)
{
int err_type = si->err_type;
/* set s->txn->status for http_error_message(s) */
s->txn->status = 503;
if (err_type & SI_ET_QUEUE_ABRT)
http_server_error(s, si, SF_ERR_CLICL, SF_FINST_Q,
http_error_message(s));
else if (err_type &... | +Info | 0 | void http_return_srv_error(struct stream *s, struct stream_interface *si)
{
int err_type = si->err_type;
/* set s->txn->status for http_error_message(s) */
s->txn->status = 503;
if (err_type & SI_ET_QUEUE_ABRT)
http_server_error(s, si, SF_ERR_CLICL, SF_FINST_Q,
http_error_message(s));
else if (err_type &... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,441 | int http_send_name_header(struct http_txn *txn, struct proxy* be, const char* srv_name) {
struct hdr_ctx ctx;
char *hdr_name = be->server_id_hdr_name;
int hdr_name_len = be->server_id_hdr_len;
struct channel *chn = txn->req.chn;
char *hdr_val;
unsigned int old_o, old_i;
ctx.idx = 0;
old_o = http_hdr_rewind(... | +Info | 0 | int http_send_name_header(struct http_txn *txn, struct proxy* be, const char* srv_name) {
struct hdr_ctx ctx;
char *hdr_name = be->server_id_hdr_name;
int hdr_name_len = be->server_id_hdr_len;
struct channel *chn = txn->req.chn;
char *hdr_val;
unsigned int old_o, old_i;
ctx.idx = 0;
old_o = http_hdr_rewind(... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,442 | static void http_server_error(struct stream *s, struct stream_interface *si,
int err, int finst, const struct chunk *msg)
{
FLT_STRM_CB(s, flt_http_reply(s, s->txn->status, msg));
channel_auto_read(si_oc(si));
channel_abort(si_oc(si));
channel_auto_close(si_oc(si));
channel_erase(si_oc(si));
channel_auto... | +Info | 0 | static void http_server_error(struct stream *s, struct stream_interface *si,
int err, int finst, const struct chunk *msg)
{
FLT_STRM_CB(s, flt_http_reply(s, s->txn->status, msg));
channel_auto_read(si_oc(si));
channel_abort(si_oc(si));
channel_auto_close(si_oc(si));
channel_erase(si_oc(si));
channel_auto... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,443 | void http_set_status(unsigned int status, const char *reason, struct stream *s)
{
struct http_txn *txn = s->txn;
char *cur_ptr, *cur_end;
int delta;
char *res;
int c_l;
const char *msg = reason;
int msg_len;
chunk_reset(&trash);
res = ultoa_o(status, trash.str, trash.size);
c_l = res - trash.str;
trash.st... | +Info | 0 | void http_set_status(unsigned int status, const char *reason, struct stream *s)
{
struct http_txn *txn = s->txn;
char *cur_ptr, *cur_end;
int delta;
char *res;
int c_l;
const char *msg = reason;
int msg_len;
chunk_reset(&trash);
res = ultoa_o(status, trash.str, trash.size);
c_l = res - trash.str;
trash.st... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,444 | int http_sync_req_state(struct stream *s)
{
struct channel *chn = &s->req;
struct http_txn *txn = s->txn;
unsigned int old_flags = chn->flags;
unsigned int old_state = txn->req.msg_state;
if (unlikely(txn->req.msg_state < HTTP_MSG_DONE))
return 0;
if (txn->req.msg_state == HTTP_MSG_DONE) {
/* No need to rea... | +Info | 0 | int http_sync_req_state(struct stream *s)
{
struct channel *chn = &s->req;
struct http_txn *txn = s->txn;
unsigned int old_flags = chn->flags;
unsigned int old_state = txn->req.msg_state;
if (unlikely(txn->req.msg_state < HTTP_MSG_DONE))
return 0;
if (txn->req.msg_state == HTTP_MSG_DONE) {
/* No need to rea... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,445 | int http_sync_res_state(struct stream *s)
{
struct channel *chn = &s->res;
struct http_txn *txn = s->txn;
unsigned int old_flags = chn->flags;
unsigned int old_state = txn->rsp.msg_state;
if (unlikely(txn->rsp.msg_state < HTTP_MSG_DONE))
return 0;
if (txn->rsp.msg_state == HTTP_MSG_DONE) {
/* In theory, we ... | +Info | 0 | int http_sync_res_state(struct stream *s)
{
struct channel *chn = &s->res;
struct http_txn *txn = s->txn;
unsigned int old_flags = chn->flags;
unsigned int old_state = txn->rsp.msg_state;
if (unlikely(txn->rsp.msg_state < HTTP_MSG_DONE))
return 0;
if (txn->rsp.msg_state == HTTP_MSG_DONE) {
/* In theory, we ... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,446 | int http_transform_header_str(struct stream* s, struct http_msg *msg,
const char* name, unsigned int name_len,
const char *str, struct my_regex *re,
int action)
{
struct hdr_ctx ctx;
char *buf = msg->chn->buf->p;
struct hdr_idx... | +Info | 0 | int http_transform_header_str(struct stream* s, struct http_msg *msg,
const char* name, unsigned int name_len,
const char *str, struct my_regex *re,
int action)
{
struct hdr_ctx ctx;
char *buf = msg->chn->buf->p;
struct hdr_idx... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,447 | static int http_upgrade_v09_to_v10(struct http_txn *txn)
{
int delta;
char *cur_end;
struct http_msg *msg = &txn->req;
if (msg->sl.rq.v_l != 0)
return 1;
/* RFC 1945 allows only GET for HTTP/0.9 requests */
if (txn->meth != HTTP_METH_GET)
return 0;
cur_end = msg->chn->buf->p + msg->sl.rq.l;
if (msg->sl.... | +Info | 0 | static int http_upgrade_v09_to_v10(struct http_txn *txn)
{
int delta;
char *cur_end;
struct http_msg *msg = &txn->req;
if (msg->sl.rq.v_l != 0)
return 1;
/* RFC 1945 allows only GET for HTTP/0.9 requests */
if (txn->meth != HTTP_METH_GET)
return 0;
cur_end = msg->chn->buf->p + msg->sl.rq.l;
if (msg->sl.... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,448 | int http_wait_for_request(struct stream *s, struct channel *req, int an_bit)
{
/*
* We will parse the partial (or complete) lines.
* We will check the request syntax, and also join multi-line
* headers. An index of all the lines will be elaborated while
* parsing.
*
* For the parsing, we use a 28 states FS... | +Info | 0 | int http_wait_for_request(struct stream *s, struct channel *req, int an_bit)
{
/*
* We will parse the partial (or complete) lines.
* We will check the request syntax, and also join multi-line
* headers. An index of all the lines will be elaborated while
* parsing.
*
* For the parsing, we use a 28 states FS... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,449 | int http_wait_for_request_body(struct stream *s, struct channel *req, int an_bit)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &s->txn->req;
/* We have to parse the HTTP request body to find any required data.
* "balance url_param check_post" should have been the only w... | +Info | 0 | int http_wait_for_request_body(struct stream *s, struct channel *req, int an_bit)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &s->txn->req;
/* We have to parse the HTTP request body to find any required data.
* "balance url_param check_post" should have been the only w... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,450 | int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &txn->rsp;
struct hdr_ctx ctx;
int use_close_only;
int cur_idx;
int n;
DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d anal... | +Info | 0 | int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct http_msg *msg = &txn->rsp;
struct hdr_ctx ctx;
int use_close_only;
int cur_idx;
int n;
DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d anal... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,451 | void inet_set_tos(int fd, const struct sockaddr_storage *from, int tos)
{
#ifdef IP_TOS
if (from->ss_family == AF_INET)
setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
#endif
#ifdef IPV6_TCLASS
if (from->ss_family == AF_INET6) {
if (IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)from)->sin6_addr))
/* v4-... | +Info | 0 | void inet_set_tos(int fd, const struct sockaddr_storage *from, int tos)
{
#ifdef IP_TOS
if (from->ss_family == AF_INET)
setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
#endif
#ifdef IPV6_TCLASS
if (from->ss_family == AF_INET6) {
if (IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)from)->sin6_addr))
/* v4-... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,452 | void init_proto_http()
{
int i;
char *tmp;
int msg;
for (msg = 0; msg < HTTP_ERR_SIZE; msg++) {
if (!http_err_msgs[msg]) {
ha_alert("Internal error: no message defined for HTTP return code %d. Aborting.\n", msg);
abort();
}
http_err_chunks[msg].str = (char *)http_err_msgs[msg];
http_err_chunks[msg].... | +Info | 0 | void init_proto_http()
{
int i;
char *tmp;
int msg;
for (msg = 0; msg < HTTP_ERR_SIZE; msg++) {
if (!http_err_msgs[msg]) {
ha_alert("Internal error: no message defined for HTTP return code %d. Aborting.\n", msg);
abort();
}
http_err_chunks[msg].str = (char *)http_err_msgs[msg];
http_err_chunks[msg].... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,453 | void manage_server_side_cookies(struct stream *s, struct channel *res)
{
struct http_txn *txn = s->txn;
struct session *sess = s->sess;
struct server *srv;
int is_cookie2;
int cur_idx, old_idx, delta;
char *hdr_beg, *hdr_end, *hdr_next;
char *prev, *att_beg, *att_end, *equal, *val_beg, *val_end, *next;
/* Iter... | +Info | 0 | void manage_server_side_cookies(struct stream *s, struct channel *res)
{
struct http_txn *txn = s->txn;
struct session *sess = s->sess;
struct server *srv;
int is_cookie2;
int cur_idx, old_idx, delta;
char *hdr_beg, *hdr_end, *hdr_next;
char *prev, *att_beg, *att_end, *equal, *val_beg, *val_end, *next;
/* Iter... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,454 | enum act_parse_ret parse_http_action_reject(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
rule->action = ACT_CUSTOM;
rule->action_ptr = http_action_reject;
return ACT_RET_PRS_OK;
}
| +Info | 0 | enum act_parse_ret parse_http_action_reject(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
rule->action = ACT_CUSTOM;
rule->action_ptr = http_action_reject;
return ACT_RET_PRS_OK;
}
| @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,455 | enum act_parse_ret parse_http_req_capture(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
struct sample_expr *expr;
struct cap_hdr *hdr;
int cur_arg;
int len = 0;
for (cur_arg = *orig_arg; cur_arg < *orig_arg + 3 && *args[cur_arg];... | +Info | 0 | enum act_parse_ret parse_http_req_capture(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
struct sample_expr *expr;
struct cap_hdr *hdr;
int cur_arg;
int len = 0;
for (cur_arg = *orig_arg; cur_arg < *orig_arg + 3 && *args[cur_arg];... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,456 | struct act_rule *parse_http_req_cond(const char **args, const char *file, int linenum, struct proxy *proxy)
{
struct act_rule *rule;
struct action_kw *custom = NULL;
int cur_arg;
char *error;
rule = calloc(1, sizeof(*rule));
if (!rule) {
ha_alert("parsing [%s:%d]: out of memory.\n", file, linenum);
goto out_... | +Info | 0 | struct act_rule *parse_http_req_cond(const char **args, const char *file, int linenum, struct proxy *proxy)
{
struct act_rule *rule;
struct action_kw *custom = NULL;
int cur_arg;
char *error;
rule = calloc(1, sizeof(*rule));
if (!rule) {
ha_alert("parsing [%s:%d]: out of memory.\n", file, linenum);
goto out_... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,457 | enum act_parse_ret parse_http_res_capture(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
struct sample_expr *expr;
int cur_arg;
int id;
char *error;
for (cur_arg = *orig_arg; cur_arg < *orig_arg + 3 && *args[cur_arg]; cur_arg++)
... | +Info | 0 | enum act_parse_ret parse_http_res_capture(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
struct sample_expr *expr;
int cur_arg;
int id;
char *error;
for (cur_arg = *orig_arg; cur_arg < *orig_arg + 3 && *args[cur_arg]; cur_arg++)
... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,458 | struct act_rule *parse_http_res_cond(const char **args, const char *file, int linenum, struct proxy *proxy)
{
struct act_rule *rule;
struct action_kw *custom = NULL;
int cur_arg;
char *error;
rule = calloc(1, sizeof(*rule));
if (!rule) {
ha_alert("parsing [%s:%d]: out of memory.\n", file, linenum);
goto out_... | +Info | 0 | struct act_rule *parse_http_res_cond(const char **args, const char *file, int linenum, struct proxy *proxy)
{
struct act_rule *rule;
struct action_kw *custom = NULL;
int cur_arg;
char *error;
rule = calloc(1, sizeof(*rule));
if (!rule) {
ha_alert("parsing [%s:%d]: out of memory.\n", file, linenum);
goto out_... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,459 | enum act_parse_ret parse_http_set_status(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
char *error;
rule->action = ACT_CUSTOM;
rule->action_ptr = action_http_set_status;
/* Check if an argument is available */
if (!*args[*orig_ar... | +Info | 0 | enum act_parse_ret parse_http_set_status(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
char *error;
rule->action = ACT_CUSTOM;
rule->action_ptr = action_http_set_status;
/* Check if an argument is available */
if (!*args[*orig_ar... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,460 | int parse_qvalue(const char *qvalue, const char **end)
{
int q = 1000;
if (!isdigit((unsigned char)*qvalue))
goto out;
q = (*qvalue++ - '0') * 1000;
if (*qvalue++ != '.')
goto out;
if (!isdigit((unsigned char)*qvalue))
goto out;
q += (*qvalue++ - '0') * 100;
if (!isdigit((unsigned char)*qvalue))
goto... | +Info | 0 | int parse_qvalue(const char *qvalue, const char **end)
{
int q = 1000;
if (!isdigit((unsigned char)*qvalue))
goto out;
q = (*qvalue++ - '0') * 1000;
if (*qvalue++ != '.')
goto out;
if (!isdigit((unsigned char)*qvalue))
goto out;
q += (*qvalue++ - '0') * 100;
if (!isdigit((unsigned char)*qvalue))
goto... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,461 | enum act_parse_ret parse_set_req_line(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
int cur_arg = *orig_arg;
rule->action = ACT_CUSTOM;
switch (args[0][4]) {
case 'm' :
rule->arg.http.action = 0;
rule->action_ptr = http_action_se... | +Info | 0 | enum act_parse_ret parse_set_req_line(const char **args, int *orig_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
int cur_arg = *orig_arg;
rule->action = ACT_CUSTOM;
switch (args[0][4]) {
case 'm' :
rule->arg.http.action = 0;
rule->action_ptr = http_action_se... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,462 | static struct pattern *pat_match_meth(struct sample *smp, struct pattern_expr *expr, int fill)
{
int icase;
struct pattern_list *lst;
struct pattern *pattern;
list_for_each_entry(lst, &expr->patterns, list) {
pattern = &lst->pat;
/* well-known method */
if (pattern->val.i != HTTP_METH_OTHER) {
if (smp->d... | +Info | 0 | static struct pattern *pat_match_meth(struct sample *smp, struct pattern_expr *expr, int fill)
{
int icase;
struct pattern_list *lst;
struct pattern *pattern;
list_for_each_entry(lst, &expr->patterns, list) {
pattern = &lst->pat;
/* well-known method */
if (pattern->val.i != HTTP_METH_OTHER) {
if (smp->d... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,463 | static int pat_parse_meth(const char *text, struct pattern *pattern, int mflags, char **err)
{
int len, meth;
len = strlen(text);
meth = find_http_meth(text, len);
pattern->val.i = meth;
if (meth == HTTP_METH_OTHER) {
pattern->ptr.str = (char *)text;
pattern->len = len;
}
else {
pattern->ptr.str = NULL;... | +Info | 0 | static int pat_parse_meth(const char *text, struct pattern *pattern, int mflags, char **err)
{
int len, meth;
len = strlen(text);
meth = find_http_meth(text, len);
pattern->val.i = meth;
if (meth == HTTP_METH_OTHER) {
pattern->ptr.str = (char *)text;
pattern->len = len;
}
else {
pattern->ptr.str = NULL;... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,464 | static int sample_conv_http_date(const struct arg *args, struct sample *smp, void *private)
{
const char day[7][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
const char mon[12][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
struct chunk *temp;
struct tm *tm;... | +Info | 0 | static int sample_conv_http_date(const struct arg *args, struct sample *smp, void *private)
{
const char day[7][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
const char mon[12][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
struct chunk *temp;
struct tm *tm;... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,465 | static int sample_conv_q_prefered(const struct arg *args, struct sample *smp, void *private)
{
const char *al = smp->data.u.str.str;
const char *end = al + smp->data.u.str.len;
const char *token;
int toklen;
int qvalue;
const char *str;
const char *w;
int best_q = 0;
/* Set the constant to the sample, because... | +Info | 0 | static int sample_conv_q_prefered(const struct arg *args, struct sample *smp, void *private)
{
const char *al = smp->data.u.str.str;
const char *end = al + smp->data.u.str.len;
const char *token;
int toklen;
int qvalue;
const char *str;
const char *w;
int best_q = 0;
/* Set the constant to the sample, because... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,466 | static int sample_conv_url_dec(const struct arg *args, struct sample *smp, void *private)
{
/* If the constant flag is set or if not size is avalaible at
* the end of the buffer, copy the string in other buffer
* before decoding.
*/
if (smp->flags & SMP_F_CONST || smp->data.u.str.size <= smp->data.u.str.len) {... | +Info | 0 | static int sample_conv_url_dec(const struct arg *args, struct sample *smp, void *private)
{
/* If the constant flag is set or if not size is avalaible at
* the end of the buffer, copy the string in other buffer
* before decoding.
*/
if (smp->flags & SMP_F_CONST || smp->data.u.str.size <= smp->data.u.str.len) {... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,467 | static int smp_conv_req_capture(const struct arg *args, struct sample *smp, void *private)
{
struct proxy *fe = strm_fe(smp->strm);
int idx, i;
struct cap_hdr *hdr;
int len;
if (!args || args->type != ARGT_SINT)
return 0;
idx = args->data.sint;
/* Check the availibity of the capture id. */
if (idx > fe->nb... | +Info | 0 | static int smp_conv_req_capture(const struct arg *args, struct sample *smp, void *private)
{
struct proxy *fe = strm_fe(smp->strm);
int idx, i;
struct cap_hdr *hdr;
int len;
if (!args || args->type != ARGT_SINT)
return 0;
idx = args->data.sint;
/* Check the availibity of the capture id. */
if (idx > fe->nb... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,468 | smp_fetch_base32(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
struct hdr_ctx ctx;
unsigned int hash = 0;
char *ptr, *beg, *end;
int len;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
ctx.idx = 0;
if (http_find_header2("Host", 4, txn->req.chn->buf->p, ... | +Info | 0 | smp_fetch_base32(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
struct hdr_ctx ctx;
unsigned int hash = 0;
char *ptr, *beg, *end;
int len;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
ctx.idx = 0;
if (http_find_header2("Host", 4, txn->req.chn->buf->p, ... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,469 | smp_fetch_base32_src(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct connection *cli_conn = objt_conn(smp->sess->origin);
if (!cli_conn)
return 0;
if (!smp_fetch_base32(args, smp, kw, private))
return 0;
temp = get_trash_chunk();
*(unsigned int *)temp... | +Info | 0 | smp_fetch_base32_src(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct connection *cli_conn = objt_conn(smp->sess->origin);
if (!cli_conn)
return 0;
if (!smp_fetch_base32(args, smp, kw, private))
return 0;
temp = get_trash_chunk();
*(unsigned int *)temp... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,470 | smp_fetch_body(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
unsigned long len;
unsigned long block1;
char *body;
struct chunk *temp;
CHECK_HTTP_MESSAGE_FIRST();
if ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ)
msg = &smp->strm->txn->req;
else
msg = &sm... | +Info | 0 | smp_fetch_body(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
unsigned long len;
unsigned long block1;
char *body;
struct chunk *temp;
CHECK_HTTP_MESSAGE_FIRST();
if ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ)
msg = &smp->strm->txn->req;
else
msg = &sm... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,471 | smp_fetch_body_len(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
CHECK_HTTP_MESSAGE_FIRST();
if ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ)
msg = &smp->strm->txn->req;
else
msg = &smp->strm->txn->rsp;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = htt... | +Info | 0 | smp_fetch_body_len(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
CHECK_HTTP_MESSAGE_FIRST();
if ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_REQ)
msg = &smp->strm->txn->req;
else
msg = &smp->strm->txn->rsp;
smp->data.type = SMP_T_SINT;
smp->data.u.sint = htt... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,472 | smp_fetch_body_param(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
unsigned long len;
unsigned long block1;
char *body;
const char *name;
int name_len;
if (!args || (args[0].type && args[0].type != ARGT_STR))
return 0;
name = "";
name_len = 0;
if (args[... | +Info | 0 | smp_fetch_body_param(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
unsigned long len;
unsigned long block1;
char *body;
const char *name;
int name_len;
if (!args || (args[0].type && args[0].type != ARGT_STR))
return 0;
name = "";
name_len = 0;
if (args[... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,473 | smp_fetch_capture_header_res(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct proxy *fe = strm_fe(smp->strm);
int idx;
if (!args || args->type != ARGT_SINT)
return 0;
idx = args->data.sint;
if (idx > (fe->nb_rsp_cap - 1) || smp->strm->res_cap == NULL || smp->strm->res_cap[id... | +Info | 0 | smp_fetch_capture_header_res(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct proxy *fe = strm_fe(smp->strm);
int idx;
if (!args || args->type != ARGT_SINT)
return 0;
idx = args->data.sint;
if (idx > (fe->nb_rsp_cap - 1) || smp->strm->res_cap == NULL || smp->strm->res_cap[id... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,474 | smp_fetch_capture_req_method(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct http_txn *txn = smp->strm->txn;
char *ptr;
if (!txn || !txn->uri)
return 0;
ptr = txn->uri;
while (*ptr != ' ' && *ptr != '\0') /* find first space */
ptr++;
temp = get_tr... | +Info | 0 | smp_fetch_capture_req_method(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct http_txn *txn = smp->strm->txn;
char *ptr;
if (!txn || !txn->uri)
return 0;
ptr = txn->uri;
while (*ptr != ' ' && *ptr != '\0') /* find first space */
ptr++;
temp = get_tr... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,475 | smp_fetch_capture_req_uri(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct http_txn *txn = smp->strm->txn;
char *ptr;
if (!txn || !txn->uri)
return 0;
ptr = txn->uri;
while (*ptr != ' ' && *ptr != '\0') /* find first space */
ptr++;
if (!*ptr)
ret... | +Info | 0 | smp_fetch_capture_req_uri(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct http_txn *txn = smp->strm->txn;
char *ptr;
if (!txn || !txn->uri)
return 0;
ptr = txn->uri;
while (*ptr != ' ' && *ptr != '\0') /* find first space */
ptr++;
if (!*ptr)
ret... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,476 | smp_fetch_capture_req_ver(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = smp->strm->txn;
if (!txn || txn->req.msg_state < HTTP_MSG_HDR_FIRST)
return 0;
if (txn->req.flags & HTTP_MSGF_VER_11)
smp->data.u.str.str = "HTTP/1.1";
else
smp->data.u.str.str = "HT... | +Info | 0 | smp_fetch_capture_req_ver(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = smp->strm->txn;
if (!txn || txn->req.msg_state < HTTP_MSG_HDR_FIRST)
return 0;
if (txn->req.flags & HTTP_MSGF_VER_11)
smp->data.u.str.str = "HTTP/1.1";
else
smp->data.u.str.str = "HT... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,477 | smp_fetch_capture_res_ver(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = smp->strm->txn;
if (!txn || txn->rsp.msg_state < HTTP_MSG_HDR_FIRST)
return 0;
if (txn->rsp.flags & HTTP_MSGF_VER_11)
smp->data.u.str.str = "HTTP/1.1";
else
smp->data.u.str.str = "HT... | +Info | 0 | smp_fetch_capture_res_ver(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn = smp->strm->txn;
if (!txn || txn->rsp.msg_state < HTTP_MSG_HDR_FIRST)
return 0;
if (txn->rsp.flags & HTTP_MSGF_VER_11)
smp->data.u.str.str = "HTTP/1.1";
else
smp->data.u.str.str = "HT... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,478 | smp_fetch_cookie_cnt(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
struct hdr_idx *idx;
struct hdr_ctx ctx;
const struct http_msg *msg;
const char *hdr_name;
int hdr_name_len;
int cnt;
char *val_beg, *val_end;
char *sol;
if (!args || args->type != ARGT_STR... | +Info | 0 | smp_fetch_cookie_cnt(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
struct hdr_idx *idx;
struct hdr_ctx ctx;
const struct http_msg *msg;
const char *hdr_name;
int hdr_name_len;
int cnt;
char *val_beg, *val_end;
char *sol;
if (!args || args->type != ARGT_STR... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,479 | smp_fetch_cookie_val(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int ret = smp_fetch_cookie(args, smp, kw, private);
if (ret > 0) {
smp->data.type = SMP_T_SINT;
smp->data.u.sint = strl2ic(smp->data.u.str.str, smp->data.u.str.len);
}
return ret;
}
| +Info | 0 | smp_fetch_cookie_val(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int ret = smp_fetch_cookie(args, smp, kw, private);
if (ret > 0) {
smp->data.type = SMP_T_SINT;
smp->data.u.sint = strl2ic(smp->data.u.str.str, smp->data.u.str.len);
}
return ret;
}
| @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,480 | smp_fetch_fhdr(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct hdr_idx *idx;
struct hdr_ctx *ctx = smp->ctx.a[0];
const struct http_msg *msg;
int occ = 0;
const char *name_str = NULL;
int name_len = 0;
if (!ctx) {
/* first call */
ctx = &static_hdr_ctx;
ctx->idx = 0;
... | +Info | 0 | smp_fetch_fhdr(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct hdr_idx *idx;
struct hdr_ctx *ctx = smp->ctx.a[0];
const struct http_msg *msg;
int occ = 0;
const char *name_str = NULL;
int name_len = 0;
if (!ctx) {
/* first call */
ctx = &static_hdr_ctx;
ctx->idx = 0;
... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,481 | smp_fetch_fhdr_cnt(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct hdr_idx *idx;
struct hdr_ctx ctx;
const struct http_msg *msg;
int cnt;
const char *name = NULL;
int len = 0;
if (args && args->type == ARGT_STR) {
name = args->data.str.str;
len = args->data.str.len;
}
... | +Info | 0 | smp_fetch_fhdr_cnt(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct hdr_idx *idx;
struct hdr_ctx ctx;
const struct http_msg *msg;
int cnt;
const char *name = NULL;
int len = 0;
if (args && args->type == ARGT_STR) {
name = args->data.str.str;
len = args->data.str.len;
}
... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,482 | smp_fetch_hdr(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct hdr_idx *idx;
struct hdr_ctx *ctx = smp->ctx.a[0];
const struct http_msg *msg;
int occ = 0;
const char *name_str = NULL;
int name_len = 0;
if (!ctx) {
/* first call */
ctx = &static_hdr_ctx;
ctx->idx = 0;
s... | +Info | 0 | smp_fetch_hdr(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct hdr_idx *idx;
struct hdr_ctx *ctx = smp->ctx.a[0];
const struct http_msg *msg;
int occ = 0;
const char *name_str = NULL;
int name_len = 0;
if (!ctx) {
/* first call */
ctx = &static_hdr_ctx;
ctx->idx = 0;
s... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,483 | smp_fetch_hdr_ip(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int ret;
while ((ret = smp_fetch_hdr(args, smp, kw, private)) > 0) {
if (url2ipv4((char *)smp->data.u.str.str, &smp->data.u.ipv4)) {
smp->data.type = SMP_T_IPV4;
break;
} else {
struct chunk *temp = get_trash_c... | +Info | 0 | smp_fetch_hdr_ip(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int ret;
while ((ret = smp_fetch_hdr(args, smp, kw, private)) > 0) {
if (url2ipv4((char *)smp->data.u.str.str, &smp->data.u.ipv4)) {
smp->data.type = SMP_T_IPV4;
break;
} else {
struct chunk *temp = get_trash_c... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,484 | smp_fetch_hdr_names(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct hdr_idx *idx;
struct hdr_ctx ctx;
const struct http_msg *msg;
struct chunk *temp;
char del = ',';
if (args && args->type == ARGT_STR)
del = *args[0].data.str.str;
CHECK_HTTP_MESSAGE_FIRST();
idx = &smp->... | +Info | 0 | smp_fetch_hdr_names(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct hdr_idx *idx;
struct hdr_ctx ctx;
const struct http_msg *msg;
struct chunk *temp;
char del = ',';
if (args && args->type == ARGT_STR)
del = *args[0].data.str.str;
CHECK_HTTP_MESSAGE_FIRST();
idx = &smp->... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,485 | smp_fetch_hdrs(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
struct hdr_idx *idx;
struct http_txn *txn;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
idx = &txn->hdr_idx;
msg = &txn->req;
smp->data.type = SMP_T_STR;
smp->data.u.str.str = msg->chn->buf... | +Info | 0 | smp_fetch_hdrs(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
struct hdr_idx *idx;
struct http_txn *txn;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
idx = &txn->hdr_idx;
msg = &txn->req;
smp->data.type = SMP_T_STR;
smp->data.u.str.str = msg->chn->buf... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,486 | smp_fetch_hdrs_bin(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
struct chunk *temp;
struct hdr_idx *idx;
const char *cur_ptr, *cur_next, *p;
int old_idx, cur_idx;
struct hdr_idx_elem *cur_hdr;
const char *hn, *hv;
int hnl, hvl;
int ret;
struct http_txn *tx... | +Info | 0 | smp_fetch_hdrs_bin(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_msg *msg;
struct chunk *temp;
struct hdr_idx *idx;
const char *cur_ptr, *cur_next, *p;
int old_idx, cur_idx;
struct hdr_idx_elem *cur_hdr;
const char *hn, *hv;
int hnl, hvl;
int ret;
struct http_txn *tx... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,487 | smp_fetch_http_auth(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!args || args->type != ARGT_USR)
return 0;
CHECK_HTTP_MESSAGE_FIRST();
if (!get_http_auth(smp->strm))
return 0;
smp->data.type = SMP_T_BOOL;
smp->data.u.sint = check_user(args->data.usr, smp->strm->txn->aut... | +Info | 0 | smp_fetch_http_auth(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!args || args->type != ARGT_USR)
return 0;
CHECK_HTTP_MESSAGE_FIRST();
if (!get_http_auth(smp->strm))
return 0;
smp->data.type = SMP_T_BOOL;
smp->data.u.sint = check_user(args->data.usr, smp->strm->txn->aut... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,488 | smp_fetch_http_auth_grp(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!args || args->type != ARGT_USR)
return 0;
CHECK_HTTP_MESSAGE_FIRST();
if (!get_http_auth(smp->strm))
return 0;
/* if the user does not belong to the userlist or has a wrong password,
* report that it u... | +Info | 0 | smp_fetch_http_auth_grp(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!args || args->type != ARGT_USR)
return 0;
CHECK_HTTP_MESSAGE_FIRST();
if (!get_http_auth(smp->strm))
return 0;
/* if the user does not belong to the userlist or has a wrong password,
* report that it u... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,489 | smp_fetch_http_first_req(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->data.type = SMP_T_BOOL;
smp->data.u.sint = !(smp->strm->txn->flags & TX_NOT_FIRST);
return 1;
}
| +Info | 0 | smp_fetch_http_first_req(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
smp->data.type = SMP_T_BOOL;
smp->data.u.sint = !(smp->strm->txn->flags & TX_NOT_FIRST);
return 1;
}
| @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,490 | smp_fetch_meth(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int meth;
struct http_txn *txn;
CHECK_HTTP_MESSAGE_FIRST_PERM();
txn = smp->strm->txn;
meth = txn->meth;
smp->data.type = SMP_T_METH;
smp->data.u.meth.meth = meth;
if (meth == HTTP_METH_OTHER) {
if (txn->rsp.msg_stat... | +Info | 0 | smp_fetch_meth(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int meth;
struct http_txn *txn;
CHECK_HTTP_MESSAGE_FIRST_PERM();
txn = smp->strm->txn;
meth = txn->meth;
smp->data.type = SMP_T_METH;
smp->data.u.meth.meth = meth;
if (meth == HTTP_METH_OTHER) {
if (txn->rsp.msg_stat... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,491 | smp_fetch_param(char delim, const char *name, int name_len, const struct arg *args, struct sample *smp, const char *kw, void *private)
{
const char *vstart, *vend;
struct chunk *temp;
const char **chunks = (const char **)smp->ctx.a;
if (!find_next_url_param(chunks,
name, name_len,
... | +Info | 0 | smp_fetch_param(char delim, const char *name, int name_len, const struct arg *args, struct sample *smp, const char *kw, void *private)
{
const char *vstart, *vend;
struct chunk *temp;
const char **chunks = (const char **)smp->ctx.a;
if (!find_next_url_param(chunks,
name, name_len,
... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,492 | smp_fetch_path(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
char *ptr, *end;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
end = txn->req.chn->buf->p + txn->req.sl.rq.u + txn->req.sl.rq.u_l;
ptr = http_get_path(txn);
if (!ptr)
return 0;
/* OK, we go... | +Info | 0 | smp_fetch_path(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
char *ptr, *end;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
end = txn->req.chn->buf->p + txn->req.sl.rq.u + txn->req.sl.rq.u_l;
ptr = http_get_path(txn);
if (!ptr)
return 0;
/* OK, we go... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,493 | smp_fetch_proto_http(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
/* Note: hdr_idx.v cannot be NULL in this ACL because the ACL is tagged
* as a layer7 ACL, which involves automatic allocation of hdr_idx.
*/
CHECK_HTTP_MESSAGE_FIRST_PERM();
smp->data.type = SMP_T_BOOL;
smp->dat... | +Info | 0 | smp_fetch_proto_http(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
/* Note: hdr_idx.v cannot be NULL in this ACL because the ACL is tagged
* as a layer7 ACL, which involves automatic allocation of hdr_idx.
*/
CHECK_HTTP_MESSAGE_FIRST_PERM();
smp->data.type = SMP_T_BOOL;
smp->dat... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,494 | smp_fetch_rqver(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
char *ptr;
int len;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
len = txn->req.sl.rq.v_l;
ptr = txn->req.chn->buf->p + txn->req.sl.rq.v;
while ((len-- > 0) && (*ptr++ != '/'));
if (len <=... | +Info | 0 | smp_fetch_rqver(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
char *ptr;
int len;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
len = txn->req.sl.rq.v_l;
ptr = txn->req.chn->buf->p + txn->req.sl.rq.v;
while ((len-- > 0) && (*ptr++ != '/'));
if (len <=... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,495 | smp_fetch_stver(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
char *ptr;
int len;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
if (txn->rsp.msg_state < HTTP_MSG_BODY)
return 0;
len = txn->rsp.sl.st.v_l;
ptr = txn->rsp.chn->buf->p;
while ((len-- > ... | +Info | 0 | smp_fetch_stver(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
char *ptr;
int len;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
if (txn->rsp.msg_state < HTTP_MSG_BODY)
return 0;
len = txn->rsp.sl.st.v_l;
ptr = txn->rsp.chn->buf->p;
while ((len-- > ... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,496 | smp_fetch_uniqueid(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (LIST_ISEMPTY(&smp->sess->fe->format_unique_id))
return 0;
if (!smp->strm->unique_id) {
if ((smp->strm->unique_id = pool_alloc(pool_head_uniqueid)) == NULL)
return 0;
smp->strm->unique_id[0] = '\0';
}
smp->d... | +Info | 0 | smp_fetch_uniqueid(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (LIST_ISEMPTY(&smp->sess->fe->format_unique_id))
return 0;
if (!smp->strm->unique_id) {
if ((smp->strm->unique_id = pool_alloc(pool_head_uniqueid)) == NULL)
return 0;
smp->strm->unique_id[0] = '\0';
}
smp->d... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,497 | smp_fetch_url(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
smp->data.type = SMP_T_STR;
smp->data.u.str.len = txn->req.sl.rq.u_l;
smp->data.u.str.str = txn->req.chn->buf->p + txn->req.sl.rq.u;
smp->flags = SM... | +Info | 0 | smp_fetch_url(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
smp->data.type = SMP_T_STR;
smp->data.u.str.len = txn->req.sl.rq.u_l;
smp->data.u.str.str = txn->req.chn->buf->p + txn->req.sl.rq.u;
smp->flags = SM... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,498 | smp_fetch_url32(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
struct hdr_ctx ctx;
unsigned int hash = 0;
char *ptr, *beg, *end;
int len;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
ctx.idx = 0;
if (http_find_header2("Host", 4, txn->req.chn->buf->p, &... | +Info | 0 | smp_fetch_url32(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct http_txn *txn;
struct hdr_ctx ctx;
unsigned int hash = 0;
char *ptr, *beg, *end;
int len;
CHECK_HTTP_MESSAGE_FIRST();
txn = smp->strm->txn;
ctx.idx = 0;
if (http_find_header2("Host", 4, txn->req.chn->buf->p, &... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
5,499 | smp_fetch_url32_src(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct connection *cli_conn = objt_conn(smp->sess->origin);
if (!cli_conn)
return 0;
if (!smp_fetch_url32(args, smp, kw, private))
return 0;
temp = get_trash_chunk();
*(unsigned int *)temp->... | +Info | 0 | smp_fetch_url32_src(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct chunk *temp;
struct connection *cli_conn = objt_conn(smp->sess->origin);
if (!cli_conn)
return 0;
if (!smp_fetch_url32(args, smp, kw, private))
return 0;
temp = get_trash_chunk();
*(unsigned int *)temp->... | @@ -7724,6 +7724,15 @@ void check_request_for_cacheability(struct stream *s, struct channel *chn)
}
}
+ /* Don't use the cache and don't try to store if we found the
+ * Authorization header */
+ val = http_header_match2(cur_ptr, cur_e... | CWE-200 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.