[interchange] * Remove SQLPASS as suggested password, use MailOrderTo or one custom-set.

Mike Heins <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
commit 5e7f66dba084e83aac6607362aaf158c84e92b2e
Author: Mike Heins <[email protected]>
Date:   Tue Mar 25 14:10:16 2014 -0400

    * Remove SQLPASS as suggested password, use MailOrderTo or one custom-set.
    * Make dump permission persistent after providing password once.
    * Make dump permission automatic if logged in as admin.

 dist/standard/pages/dump.html |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/dist/standard/pages/dump.html b/dist/standard/pages/dump.html
index dd6b13d..d9e0879 100644
--- a/dist/standard/pages/dump.html
+++ b/dist/standard/pages/dump.html
@@ -1,7 +1,14 @@
 [calc]
     $Tag->tmp('tmp_gate_dump');
-    $pass = $Variable->{SQLPASS} || $Variable->{ORDERS_TO} || $Config->{MailOrderTo} || 'bogus';
-    if($CGI->{password} eq $pass) {
+    $pass = $Variable->{DUMP_PASSWORD} || $Variable->{ORDERS_TO} || $Config->{MailOrderTo}
+		or return;
+    if(
+		$Session->{given_dump_password}
+		or $Session->{admin}
+		or $CGI->{password} eq $pass
+		)
+	{
+		$Session->{given_dump_password} = 1;
         $Scratch->{tmp_gate_dump} = 1;
     } 
     $CGI->{sort} = 1 unless defined $CGI->{sort};
@@ -10,10 +17,14 @@
 [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.
+    You must provide the password. It is usually 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">
+	<br>
+	sort keys
+	<input type=radio name=sort value=1 checked> yes 
+	<input type=radio name=sort value=0> no 
     </form>
 [/else]
 [/if]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.