Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Interchange has long been distributing the dump page. This is
somewhat insecure; it should be gated with a password. This is a change to pages/dump.html in the standard template. Makes the password be __SQLPASS__ or __ORDERS_TO__. * Allow option to sort the keys of output in ::full_dump. Turn on that option by default in the standard dump page.
- Loading branch information
Mike Heins
committed
Mar 23, 2014
1 parent
4816a70
commit a7d81f9
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
<xmp>[dump key="[cgi key]"]</xmp> | ||
[calc] | ||
$Tag->tmp('tmp_gate_dump'); | ||
$pass = $Variable->{SQLPASS} || $Variable->{ORDERS_TO} || $Config->{MailOrderTo} || 'bogus'; | ||
if($CGI->{password} eq $pass) { | ||
$Scratch->{tmp_gate_dump} = 1; | ||
} | ||
$CGI->{sort} = 1 unless defined $CGI->{sort}; | ||
return; | ||
[/calc] | ||
[if scratch tmp_gate_dump] | ||
<xmp>[dump key="[cgi key]" sort="[cgi sort]"]</xmp> | ||
[else] | ||
You must provide the password. It is usually the SQL server password, or the email address where orders go. | ||
<form action="[process href=@@MV_PAGE@@ secure=1]" METHOD=post> | ||
Password: <input type="text" name=password value=""> | ||
<input type="submit" value="Dump"> | ||
</form> | ||
[/else] | ||
[/if] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters