[shibboleth-sp2] 24/29: https://issues.shibboleth.net/jira/browse/SSPCPP-381
Ferenc Wágner
wferi-guest at moszumanska.debian.org
Tue Jan 26 21:30:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
wferi-guest pushed a commit to annotated tag 2.4.3
in repository shibboleth-sp2.
commit 80fd85f927cdb35528229553d8589dc3b5e0a96c
Author: Scott Cantor <cantor.2 at osu.edu>
Date: Thu Jun 30 00:26:59 2011 +0000
https://issues.shibboleth.net/jira/browse/SSPCPP-381
---
apache/mod_apache.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/apache/mod_apache.cpp b/apache/mod_apache.cpp
index baeb994..9ed5159 100644
--- a/apache/mod_apache.cpp
+++ b/apache/mod_apache.cpp
@@ -173,6 +173,7 @@ struct shib_dir_config
int bExportAssertion; // export SAML assertion to the environment?
int bUseEnvVars; // use environment?
int bUseHeaders; // use headers?
+ int bExpireRedirects; // expire redirects?
};
// creates per-directory config structure
@@ -193,6 +194,7 @@ extern "C" void* create_shib_dir_config (SH_AP_POOL* p, char* d)
dc->bExportAssertion = -1;
dc->bUseEnvVars = -1;
dc->bUseHeaders = -1;
+ dc->bExpireRedirects = -1;
return dc;
}
@@ -257,6 +259,7 @@ extern "C" void* merge_shib_dir_config (SH_AP_POOL* p, void* base, void* sub)
dc->bAuthoritative=((child->bAuthoritative==-1) ? parent->bAuthoritative : child->bAuthoritative);
dc->bUseEnvVars=((child->bUseEnvVars==-1) ? parent->bUseEnvVars : child->bUseEnvVars);
dc->bUseHeaders=((child->bUseHeaders==-1) ? parent->bUseHeaders : child->bUseHeaders);
+ dc->bExpireRedirects=((child->bExpireRedirects==-1) ? parent->bExpireRedirects : child->bExpireRedirects);
return dc;
}
@@ -587,6 +590,10 @@ public:
long sendRedirect(const char* url) {
HTTPResponse::sendRedirect(url);
ap_table_set(m_req->headers_out, "Location", url);
+ if (m_dc->bExpireRedirects == 1) {
+ ap_table_set(m_req->headers_out, "Expires", "01-Jan-1997 12:00:00 GMT");
+ ap_table_set(m_req->headers_out, "Cache-Control", "private,no-store,no-cache");
+ }
return REDIRECT;
}
const vector<string>& getClientCertificates() const {
@@ -1561,6 +1568,9 @@ static command_rec shire_cmds[] = {
{"ShibUseHeaders", (config_fn_t)ap_set_flag_slot,
(void *) XtOffsetOf (shib_dir_config, bUseHeaders),
OR_AUTHCFG, FLAG, "Export attributes using custom HTTP headers"},
+ {"ShibExpireRedirects", (config_fn_t)ap_set_flag_slot,
+ (void *) XtOffsetOf (shib_dir_config, bExpireRedirects),
+ OR_AUTHCFG, FLAG, "Expire SP-generated redirects"},
{nullptr}
};
@@ -1680,6 +1690,9 @@ static command_rec shib_cmds[] = {
AP_INIT_FLAG("ShibUseHeaders", (config_fn_t)ap_set_flag_slot,
(void *) offsetof (shib_dir_config, bUseHeaders),
OR_AUTHCFG, "Export attributes using custom HTTP headers"),
+ AP_INIT_FLAG("ShibExpireRedirects", (config_fn_t)ap_set_flag_slot,
+ (void *) offsetof (shib_dir_config, bExpireRedirects),
+ OR_AUTHCFG, "Expire SP-generated redirects"),
{nullptr}
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git
More information about the Pkg-shibboleth-devel
mailing list