Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
b655ad5a
Commit
b655ad5a
authored
Feb 11, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
saving user's email
parent
a8bbbda1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
14 deletions
+31
-14
asn1c/webcgi/asn1c.cgi
asn1c/webcgi/asn1c.cgi
+31
-14
No files found.
asn1c/webcgi/asn1c.cgi
View file @
b655ad5a
...
...
@@ -40,13 +40,20 @@ $homePath = "<FONT FACE=Courier SIZE=-1>"
# The code below rarely requires any modification #
###################################################
my
$redirect
=
'';
# No redirection by default
my
$content
=
'';
# Default content is empty
use
CGI
qw/param cookie header upload escapeHTML/
;
$|
=
1
;
# Enable AutoFlush (for older versions of Perl)
my
$redirect
=
'';
# No redirection by default
my
$redirect_bottom
=
'';
# No redirection text by default
my
$content
=
'';
# Default content is empty
sub
IssueRedirect
()
{
$redirect
=
"
<META HTTP-EQUIV=
\"
Refresh
\"
"
.
"
CONTENT=
\"
5; URL=
$myName
\"
>
";
$redirect_bottom
=
"
<P><CENTER>This page will <A HREF=
$ASN1C_Page
/asn1c.cgi>disappear</A> in 5 seconds.</CENTER>
"
}
# If something goes wrong, this function is invoked to display the error message
sub
bark
($@)
{
local
$_
=
join
("
<BR>
\n
",
@_
);
...
...
@@ -147,19 +154,28 @@ my $EnvironmentSetOK = prepareChrootEnvironment();
# Record user's email.
#
$userEmail
=
cookie
('
userEmail
');
$userEmail
=
$defaultUserEmail
unless
$userEmail
;
$userEmail
=
$defaultUserEmail
unless
defined
(
$userEmail
)
;
$tmpEmail
=
param
('
email
');
if
(
defined
(
$tmpEmail
)
&&
$tmpEmail
ne
$userEmail
)
{
if
(
defined
(
$tmpEmail
))
{
unless
(
$tmpEmail
=~
/^\s*([a-z0-9._+-]+@[a-z0-9.+-]+)\s*$/i
)
{
bark
("
Invalid email address:
"
.
"
<B><FONT COLOR=darkred>
$tmpEmail
</FONT></B>
");
}
my
$previousEmail
=
$userEmail
;
$userEmail
=
$1
;
local
$ck
=
cookie
(
-
name
=>
'
userEmail
',
-
value
=>
$userEmail
,
-
path
=>
'
/
',
-
expires
=>
'
+1d
');
print
"
Set-Cookie:
"
.
$ck
.
"
\n
";
if
(
$userEmail
eq
$defaultUserEmail
)
{
IssueRedirect
();
bark
("
Please enter <FONT COLOR=red>your own</FONT>
"
.
"
email address,
"
.
"
instead of default
\"
<FONT COLOR=darkred>
$defaultUserEmail
</FONT>
\"
");
}
if
(
$userEmail
ne
$previousEmail
)
{
# Refresh cookie contents.
local
$ck
=
cookie
(
-
name
=>
'
userEmail
',
-
value
=>
$userEmail
,
-
path
=>
'
/
',
-
expires
=>
'
+1d
');
print
"
Set-Cookie:
"
.
$ck
.
"
\n
";
}
}
#
...
...
@@ -264,7 +280,7 @@ if(defined($transHelp)
open
(
S
,
"
| sendmail -it
")
or
bark
("
Cannot perform help request, please email to the address below
");
print
S
"
From:
$userEmail
\n
";
print
S
"
To:
$HelpEmail
\n
";
print
S
"
Subject: asn1c help requested for $
2--$3
\n
";
print
S
"
Subject: asn1c help requested for $
3 ($1)
\n
";
print
S
"
\n
";
print
S
"
User
$userEmail
requested help with
\n
$session
/$2--$3 ($1)
\n
";
print
S
"
\n
--
\n
asn1c
\n
";
...
...
@@ -275,10 +291,9 @@ if(defined($transHelp)
$content
=
'
<CENTER>Transaction
'
.
"
$1 ($3) is marked for manual processing.<BR>
"
.
"
Results will be mailed to
"
.
"
<FONT COLOR=darkgreen>
$userEmail
</FONT> shortly.<BR>
"
.
"
<P>This page will <A HREF=
$ASN1C_Page
/asn1c.cgi>disappear</A> in 5 seconds.
"
.
"
<FONT COLOR=darkgreen>
$userEmail
</FONT> shortly.
"
.
"
</CONTENT>
";
$redirect
=
"
<META HTTP-EQUIV=
\"
Refresh
\"
CONTENT=
\"
5
\"
>
"
;
IssueRedirect
()
;
goto
PRINTOUT
;
}
...
...
@@ -620,6 +635,8 @@ $homePath
$content
$redirect_bottom
<HR WIDTH=70%>
<CENTER><ADDRESS><FONT SIZE=-1 FACE=Courier COLOR=#404040>
<A HREF=$ASN1C_Page>The ASN.1 Compiler</A>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment