Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
b2bd8a2b
Commit
b2bd8a2b
authored
Aug 20, 2013
by
Robert Ricci
Browse files
Only listen on localhost
This script is not nearly secure enough to be open to anyone in the world
parent
f3f06497
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/git/gitmaild
View file @
b2bd8a2b
...
...
@@ -55,11 +55,15 @@ sub run_gitmail($);
sub
format_options
(@);
sub
call_gitlab_api
($);
# TODO: listen only on localhost
my
$d
=
HTTP::
Daemon
->
new
(
LocalPort
=>
$PORT
)
||
die
;
print
"
Please contact me at: <URL:
",
$d
->
url
,
"
>
\n
";
#
# Open up a new socket - runs only on localhost, this thing is not nearly
# secure enough to be open to the world
#
my
$listen_socket
=
HTTP::
Daemon
->
new
(
LocalAddr
=>
'
localhost
',
LocalPort
=>
$PORT
)
||
die
;
print
"
gitmaild running at:
",
$listen_socket
->
url
,
"
\n
";
while
(
my
$c
=
$
d
->
accept
)
{
while
(
my
$c
=
$
listen_socket
->
accept
)
{
# TODO: Fork
while
(
my
$r
=
$c
->
get_request
)
{
...
...
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