Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
92fb7361
Commit
92fb7361
authored
20 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Reject filenames beginning with '-' (security concern).
parent
cbb0d4c6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/ftpsrvr.c
+7
-2
7 additions, 2 deletions
src/sbbs3/ftpsrvr.c
with
7 additions
and
2 deletions
src/sbbs3/ftpsrvr.c
+
7
−
2
View file @
92fb7361
...
...
@@ -4123,7 +4123,8 @@ static void ctrl_thread(void* arg)
sockprintf
(
sock
,
"553 Insufficient access."
);
continue
;
}
if
(
strcspn
(
p
,
ILLEGAL_FILENAME_CHARS
)
!=
strlen
(
p
)
if
(
*
p
==
'-'
||
strcspn
(
p
,
ILLEGAL_FILENAME_CHARS
)
!=
strlen
(
p
)
||
trashcan
(
&
scfg
,
p
,
"file"
))
{
lprintf
(
LOG_WARNING
,
"%04d !ILLEGAL FILENAME ATTEMPT by %s: %s"
,
sock
,
user
.
alias
,
p
);
...
...
@@ -4649,7 +4650,7 @@ void DLLCALL ftp_server(void* arg)
return
;
}
lprintf
(
LOG_DEBUG
,
"%04d FTP socket opened"
,
server_socket
);
lprintf
(
LOG_DEBUG
,
"%04d FTP
Server
socket opened"
,
server_socket
);
/*****************************/
/* Listen for incoming calls */
...
...
@@ -4782,6 +4783,10 @@ void DLLCALL ftp_server(void* arg)
served
++
;
}
#ifdef _DEBUG
lprintf
(
LOG_DEBUG
,
"0000 server_socket: %d"
,
server_socket
);
lprintf
(
LOG_DEBUG
,
"0000 terminate_server: %d"
,
terminate_server
);
#endif
if
(
active_clients
)
{
lprintf
(
LOG_DEBUG
,
"0000 Waiting for %d active clients to disconnect..."
,
active_clients
);
start
=
time
(
NULL
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment