зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 15980: Password is no longer shown in the location bar on the first page you load after logging in.
Patch by Dave Miller <justdave@syndicomm.com> r= jake@acutex.net
This commit is contained in:
Родитель
4fb2d58937
Коммит
3b98736d18
|
@ -20,6 +20,7 @@
|
||||||
# Contributor(s): Terry Weissman <terry@mozilla.org>
|
# Contributor(s): Terry Weissman <terry@mozilla.org>
|
||||||
# Dan Mosedale <dmose@mozilla.org>
|
# Dan Mosedale <dmose@mozilla.org>
|
||||||
# Joe Robins <jmrobins@tgix.com>
|
# Joe Robins <jmrobins@tgix.com>
|
||||||
|
# Dave Miller <justdave@syndicomm.com>
|
||||||
|
|
||||||
# Contains some global routines used throughout the CGI scripts of Bugzilla.
|
# Contains some global routines used throughout the CGI scripts of Bugzilla.
|
||||||
|
|
||||||
|
@ -914,9 +915,14 @@ Content-type: text/html
|
||||||
$nexturl = $&;
|
$nexturl = $&;
|
||||||
}
|
}
|
||||||
my $method = "POST";
|
my $method = "POST";
|
||||||
if (defined $ENV{"REQUEST_METHOD"} && length($::buffer) > 1) {
|
# We always want to use POST here, because we're submitting a password and don't
|
||||||
$method = $ENV{"REQUEST_METHOD"};
|
# want to see it in the location bar in the browser in case a co-worker is looking
|
||||||
}
|
# over your shoulder. If you have cookies off and need to bookmark the query, you
|
||||||
|
# can bookmark it from the screen asking for your password, and it should still
|
||||||
|
# work. See http://bugzilla.mozilla.org/show_bug.cgi?id=15980
|
||||||
|
# if (defined $ENV{"REQUEST_METHOD"} && length($::buffer) > 1) {
|
||||||
|
# $method = $ENV{"REQUEST_METHOD"};
|
||||||
|
# }
|
||||||
print "
|
print "
|
||||||
<FORM action=$nexturl method=$method>
|
<FORM action=$nexturl method=$method>
|
||||||
<table>
|
<table>
|
||||||
|
|
|
@ -724,9 +724,15 @@ The changes made were:
|
||||||
$::FORM{'delta_ts'} = $delta_ts;
|
$::FORM{'delta_ts'} = $delta_ts;
|
||||||
print "<li><form method=post>";
|
print "<li><form method=post>";
|
||||||
foreach my $i (keys %::FORM) {
|
foreach my $i (keys %::FORM) {
|
||||||
|
# Make sure we don't include the username/password fields in the
|
||||||
|
# HTML. If cookies are off, they'll have to reauthenticate after
|
||||||
|
# hitting "submit changes anyway".
|
||||||
|
# see http://bugzilla.mozilla.org/show_bug.cgi?id=15980
|
||||||
|
if ($i !~ /^(Bugzilla|LDAP)_(login|password)$/) {
|
||||||
my $value = value_quote($::FORM{$i});
|
my $value = value_quote($::FORM{$i});
|
||||||
print qq{<input type=hidden name="$i" value="$value">\n};
|
print qq{<input type=hidden name="$i" value="$value">\n};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
print qq{<input type=submit value="Submit my changes anyway">\n};
|
print qq{<input type=submit value="Submit my changes anyway">\n};
|
||||||
print " This will cause all of the above changes to be overwritten";
|
print " This will cause all of the above changes to be overwritten";
|
||||||
if ($longchanged) {
|
if ($longchanged) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче