Skip to content

Fix typo #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ngx_http_modsecurity_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ ngx_int_t ngx_http_modsecurity_body_filter(ngx_http_request_t *r, ngx_chain_t *i
ngx_int_t ngx_http_modsecurity_header_filter_init(void);
ngx_int_t ngx_http_modsecurity_header_filter(ngx_http_request_t *r);
#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
int ngx_http_modescurity_store_ctx_header(ngx_http_request_t *r, ngx_str_t *name, ngx_str_t *value);
int ngx_http_modsecurity_store_ctx_header(ngx_http_request_t *r, ngx_str_t *name, ngx_str_t *value);
#endif

/* ngx_http_modsecurity_log.c */
Expand Down
22 changes: 11 additions & 11 deletions src/ngx_http_modsecurity_header_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ngx_http_modsecurity_header_out_t ngx_http_modsecurity_headers_out[] = {

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
int
ngx_http_modescurity_store_ctx_header(ngx_http_request_t *r, ngx_str_t *name, ngx_str_t *value)
ngx_http_modsecurity_store_ctx_header(ngx_http_request_t *r, ngx_str_t *name, ngx_str_t *value)
{
ngx_http_modsecurity_ctx_t *ctx;
ngx_http_modsecurity_conf_t *mcf;
Expand Down Expand Up @@ -167,7 +167,7 @@ ngx_http_modsecurity_resolv_header_server(ngx_http_request_t *r, ngx_str_t name,
}

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &name, &value);
ngx_http_modsecurity_store_ctx_header(r, &name, &value);
#endif

return msc_add_n_response_header(ctx->modsec_transaction,
Expand Down Expand Up @@ -196,7 +196,7 @@ ngx_http_modsecurity_resolv_header_date(ngx_http_request_t *r, ngx_str_t name, o
}

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &name, &date);
ngx_http_modsecurity_store_ctx_header(r, &name, &date);
#endif

return msc_add_n_response_header(ctx->modsec_transaction,
Expand All @@ -223,7 +223,7 @@ ngx_http_modsecurity_resolv_header_content_length(ngx_http_request_t *r, ngx_str
value.len = strlen(buf);

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &name, &value);
ngx_http_modsecurity_store_ctx_header(r, &name, &value);
#endif
return msc_add_n_response_header(ctx->modsec_transaction,
(const unsigned char *) name.data,
Expand All @@ -247,7 +247,7 @@ ngx_http_modsecurity_resolv_header_content_type(ngx_http_request_t *r, ngx_str_t
{

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &name, &r->headers_out.content_type);
ngx_http_modsecurity_store_ctx_header(r, &name, &r->headers_out.content_type);
#endif

return msc_add_n_response_header(ctx->modsec_transaction,
Expand Down Expand Up @@ -280,7 +280,7 @@ ngx_http_modsecurity_resolv_header_last_modified(ngx_http_request_t *r, ngx_str_
value.len = (int)(p-buf);

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &name, &value);
ngx_http_modsecurity_store_ctx_header(r, &name, &value);
#endif

return msc_add_n_response_header(ctx->modsec_transaction,
Expand Down Expand Up @@ -316,7 +316,7 @@ ngx_http_modsecurity_resolv_header_connection(ngx_http_request_t *r, ngx_str_t n
value.len = strlen((char *)buf);

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &name2, &value);
ngx_http_modsecurity_store_ctx_header(r, &name2, &value);
#endif

msc_add_n_response_header(ctx->modsec_transaction,
Expand All @@ -333,7 +333,7 @@ ngx_http_modsecurity_resolv_header_connection(ngx_http_request_t *r, ngx_str_t n
value.len = strlen(connection);

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &name, &value);
ngx_http_modsecurity_store_ctx_header(r, &name, &value);
#endif

return msc_add_n_response_header(ctx->modsec_transaction,
Expand All @@ -354,7 +354,7 @@ ngx_http_modsecurity_resolv_header_transfer_encoding(ngx_http_request_t *r, ngx_
ctx = ngx_http_get_module_ctx(r, ngx_http_modsecurity_module);

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &name, &value);
ngx_http_modsecurity_store_ctx_header(r, &name, &value);
#endif

return msc_add_n_response_header(ctx->modsec_transaction,
Expand All @@ -381,7 +381,7 @@ ngx_http_modsecurity_resolv_header_vary(ngx_http_request_t *r, ngx_str_t name, o
ctx = ngx_http_get_module_ctx(r, ngx_http_modsecurity_module);

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &name, &value);
ngx_http_modsecurity_store_ctx_header(r, &name, &value);
#endif

return msc_add_n_response_header(ctx->modsec_transaction,
Expand Down Expand Up @@ -488,7 +488,7 @@ ngx_http_modsecurity_header_filter(ngx_http_request_t *r)
}

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &data[i].key, &data[i].value);
ngx_http_modsecurity_store_ctx_header(r, &data[i].key, &data[i].value);
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion src/ngx_http_modsecurity_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ ngx_http_modsecurity_process_intervention (Transaction *transaction, ngx_http_re
r->headers_out.location->hash = 1;

#if defined(MODSECURITY_SANITY_CHECKS) && (MODSECURITY_SANITY_CHECKS)
ngx_http_modescurity_store_ctx_header(r, &location->key, &location->value);
ngx_http_modsecurity_store_ctx_header(r, &location->key, &location->value);
#endif

return intervention.status;
Expand Down