For most of CAF's purposes, the srcdump request parameter is not
really for srcdump, since it is not related to authentication.
Rather, it exists simply because we do not own the application path
namespace. So when generating (or requesting) redirects etc. we
should treat it as a form parameter relating to the application.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Returns a hash of the "relevant" parameters to this request, in a form
suitable for C<url_with_query_params>. This is all of the query
Returns a hash of the "relevant" parameters to this request, in a form
suitable for C<url_with_query_params>. This is all of the query
-parameters which are not related to CGI::Auth::Flexible. The
+parameters which are not related to CGI::Auth::Flexible's authentication
+arrangements. (The srcdump request parameters B<are> included.) The
PATH_INFO from the request is returned as the parameter C<< '' >>.
=back
PATH_INFO from the request is returned as the parameter C<< '' >>.
=back
The contents of this hashref does not include the CAF-specific
parameters such as the secret cookie, those which follow from the kind
The contents of this hashref does not include the CAF-specific
parameters such as the secret cookie, those which follow from the kind
-of diversion requested, etc.
+of diversion requested, etc. (But they may include the
+srcdump_param_name, so that srcdump_needlogin can work properly.)
It is correct to always include the contents of C<Params> as hidden
parameters in the urls for all redirections, and as hidden input
It is correct to always include the contents of C<Params> as hidden
parameters in the urls for all redirections, and as hidden input
- if ($srcdump || !$r->{S}{srcdump_needlogin}) {
+ print STDERR "$r->{S}{srcdump_needlogin}\n";
+ if ($srcdump && !$r->{S}{srcdump_needlogin}) {
+ print STDERR "NOT NOW\n";
my $cooksraw = $r->_ch('get_cookie');
my $cooks = $r->_unblind($cooksraw);
my $cooksraw = $r->_ch('get_cookie');
my $cooks = $r->_unblind($cooksraw);
my %p = %{ $r->_ch('get_params') };
foreach my $pncn (keys %{ $r->{S} }) {
my $names;
my %p = %{ $r->_ch('get_params') };
foreach my $pncn (keys %{ $r->{S} }) {
my $names;
- if ($pncn =~ m/_param_name$/) {
+ if ($pncn =~ m/^srcdump_/) {
+ next;
+ } elsif ($pncn =~ m/_param_name$/) {
my $name = $r->{S}{$pncn};
die "$pncn ?" if ref $name;
$names = [ $name ];
my $name = $r->{S}{$pncn};
die "$pncn ?" if ref $name;
$names = [ $name ];