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
e565de71
Commit
e565de71
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Temporary message files are now stored in the node's temp directory (for security reasons).
parent
6358984a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sbbs3/getmsg.cpp
+1
-1
1 addition, 1 deletion
src/sbbs3/getmsg.cpp
src/sbbs3/writemsg.cpp
+16
-16
16 additions, 16 deletions
src/sbbs3/writemsg.cpp
with
17 additions
and
17 deletions
src/sbbs3/getmsg.cpp
+
1
−
1
View file @
e565de71
...
...
@@ -257,7 +257,7 @@ void sbbs_t::quotemsg(smbmsg_t* msg, int tails)
{
char
str
[
256
];
sprintf
(
str
,
"%sQUOTES.TXT"
,
cfg
.
node
_dir
);
sprintf
(
str
,
"%sQUOTES.TXT"
,
cfg
.
temp
_dir
);
remove
(
str
);
msgtotxt
(
msg
,
str
,
0
,
tails
);
}
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/writemsg.cpp
+
16
−
16
View file @
e565de71
...
...
@@ -84,14 +84,14 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
/* Quote entire message to MSGTMP or INPUT.MSG */
if
(
useron
.
xedit
&&
cfg
.
xedit
[
useron
.
xedit
-
1
]
->
misc
&
QUOTEALL
)
{
sprintf
(
str
,
"%sQUOTES.TXT"
,
cfg
.
node
_dir
);
sprintf
(
str
,
"%sQUOTES.TXT"
,
cfg
.
temp
_dir
);
if
((
stream
=
fnopen
(
NULL
,
str
,
O_RDONLY
))
==
NULL
)
{
errormsg
(
WHERE
,
ERR_OPEN
,
str
,
O_RDONLY
);
LFREE
(
buf
);
return
(
false
);
}
sprintf
(
str
,
"%s%s"
,
cfg
.
node
_dir
,
msgtmp
);
/* file for quoted msg */
sprintf
(
str
,
"%s%s"
,
cfg
.
temp
_dir
,
msgtmp
);
/* file for quoted msg */
if
((
file
=
nopen
(
str
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
))
==-
1
)
{
errormsg
(
WHERE
,
ERR_OPEN
,
str
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
);
LFREE
(
buf
);
...
...
@@ -117,13 +117,13 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
;
else
if
(
yesno
(
text
[
QuoteMessageQ
]))
{
sprintf
(
str
,
"%sQUOTES.TXT"
,
cfg
.
node
_dir
);
sprintf
(
str
,
"%sQUOTES.TXT"
,
cfg
.
temp
_dir
);
if
((
stream
=
fnopen
(
&
file
,
str
,
O_RDONLY
))
==
NULL
)
{
errormsg
(
WHERE
,
ERR_OPEN
,
str
,
O_RDONLY
);
LFREE
(
buf
);
return
(
false
);
}
sprintf
(
str
,
"%s%s"
,
cfg
.
node
_dir
,
msgtmp
);
/* file for quoted msg */
sprintf
(
str
,
"%s%s"
,
cfg
.
temp
_dir
,
msgtmp
);
/* file for quoted msg */
if
((
file
=
nopen
(
str
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
))
==-
1
)
{
errormsg
(
WHERE
,
ERR_OPEN
,
str
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
);
LFREE
(
buf
);
...
...
@@ -205,7 +205,7 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
fclose
(
stream
);
close
(
file
);
}
}
else
{
sprintf
(
str
,
"%sQUOTES.TXT"
,
cfg
.
node
_dir
);
sprintf
(
str
,
"%sQUOTES.TXT"
,
cfg
.
temp
_dir
);
remove
(
str
);
}
if
(
!
online
||
sys_status
&
SS_ABORT
)
{
...
...
@@ -287,7 +287,7 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
if
(
cfg
.
xedit
[
useron
.
xedit
-
1
]
->
misc
&
WWIVCOLOR
)
ex_mode
|=
EX_WWIV
;
}
sprintf
(
str
,
"%s%s"
,
cfg
.
node
_dir
,
msgtmp
);
/* temporary file for input */
sprintf
(
str
,
"%s%s"
,
cfg
.
temp
_dir
,
msgtmp
);
/* temporary file for input */
if
(
!
linesquoted
&&
fexist
(
str
))
remove
(
str
);
if
(
linesquoted
)
{
...
...
@@ -296,14 +296,14 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
if
(
online
==
ON_LOCAL
)
{
if
(
cfg
.
node_misc
&
NM_LCL_EDIT
&&
cfg
.
node_editor
[
0
])
external
(
cmdstr
(
cfg
.
node_editor
,
str
,
nulstr
,
NULL
)
,
0
,
cfg
.
node
_dir
);
,
0
,
cfg
.
temp
_dir
);
else
external
(
cmdstr
(
cfg
.
xedit
[
useron
.
xedit
-
1
]
->
lcmd
,
str
,
nulstr
,
NULL
)
,
ex_mode
,
cfg
.
node
_dir
);
}
,
ex_mode
,
cfg
.
temp
_dir
);
}
else
{
rioctl
(
IOCM
|
PAUSE
|
ABORT
);
external
(
cmdstr
(
cfg
.
xedit
[
useron
.
xedit
-
1
]
->
rcmd
,
str
,
nulstr
,
NULL
),
ex_mode
,
cfg
.
node
_dir
);
external
(
cmdstr
(
cfg
.
xedit
[
useron
.
xedit
-
1
]
->
rcmd
,
str
,
nulstr
,
NULL
),
ex_mode
,
cfg
.
temp
_dir
);
rioctl
(
IOSM
|
PAUSE
|
ABORT
);
}
checkline
();
if
(
!
fexist
(
str
)
||
!
online
...
...
@@ -330,7 +330,7 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
else
{
buf
[
0
]
=
0
;
if
(
linesquoted
)
{
sprintf
(
str
,
"%s%s"
,
cfg
.
node
_dir
,
msgtmp
);
sprintf
(
str
,
"%s%s"
,
cfg
.
temp
_dir
,
msgtmp
);
if
((
file
=
nopen
(
str
,
O_RDONLY
))
!=-
1
)
{
length
=
filelength
(
file
);
l
=
length
>
cfg
.
level_linespermsg
[
useron_level
]
*
MAX_LINE_LEN
...
...
@@ -408,7 +408,7 @@ void sbbs_t::editor_inf(int xeditnum,char *dest, char *title, long mode
xeditnum
--
;
if
(
cfg
.
xedit
[
xeditnum
]
->
misc
&
QUICKBBS
)
{
sprintf
(
str
,
"%sMSGINF"
,
cfg
.
node
_dir
);
sprintf
(
str
,
"%sMSGINF"
,
cfg
.
temp
_dir
);
if
((
file
=
nopen
(
str
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
))
==-
1
)
{
errormsg
(
WHERE
,
ERR_OPEN
,
str
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
);
return
;
}
...
...
@@ -750,10 +750,10 @@ void sbbs_t::editfile(char *str)
long
length
,
maxlines
,
lines
,
l
;
maxlines
=
cfg
.
level_linespermsg
[
useron
.
level
];
sprintf
(
str2
,
"%sQUOTES.TXT"
,
cfg
.
node
_dir
);
sprintf
(
str2
,
"%sQUOTES.TXT"
,
cfg
.
temp
_dir
);
remove
(
str2
);
if
(
cfg
.
node_editor
[
0
]
&&
online
==
ON_LOCAL
)
{
external
(
cmdstr
(
cfg
.
node_editor
,
str
,
nulstr
,
NULL
),
0
,
cfg
.
node
_dir
);
external
(
cmdstr
(
cfg
.
node_editor
,
str
,
nulstr
,
NULL
),
0
,
cfg
.
temp
_dir
);
return
;
}
if
(
useron
.
xedit
)
{
editor_inf
(
useron
.
xedit
,
nulstr
,
nulstr
,
0
,
INVALID_SUB
);
...
...
@@ -764,10 +764,10 @@ void sbbs_t::editfile(char *str)
if
(
cfg
.
xedit
[
useron
.
xedit
-
1
]
->
misc
&
WWIVCOLOR
)
mode
|=
EX_WWIV
;
}
if
(
online
==
ON_LOCAL
)
external
(
cmdstr
(
cfg
.
xedit
[
useron
.
xedit
-
1
]
->
lcmd
,
str
,
nulstr
,
NULL
),
mode
,
cfg
.
node
_dir
);
external
(
cmdstr
(
cfg
.
xedit
[
useron
.
xedit
-
1
]
->
lcmd
,
str
,
nulstr
,
NULL
),
mode
,
cfg
.
temp
_dir
);
else
{
rioctl
(
IOCM
|
PAUSE
|
ABORT
);
external
(
cmdstr
(
cfg
.
xedit
[
useron
.
xedit
-
1
]
->
rcmd
,
str
,
nulstr
,
NULL
),
mode
,
cfg
.
node
_dir
);
external
(
cmdstr
(
cfg
.
xedit
[
useron
.
xedit
-
1
]
->
rcmd
,
str
,
nulstr
,
NULL
),
mode
,
cfg
.
temp
_dir
);
rioctl
(
IOSM
|
PAUSE
|
ABORT
);
}
return
;
}
if
((
buf
=
(
char
*
)
MALLOC
(
maxlines
*
MAX_LINE_LEN
))
==
NULL
)
{
...
...
@@ -1000,7 +1000,7 @@ void sbbs_t::editmsg(smbmsg_t *msg, uint subnum)
if
(
!
msg
->
hdr
.
total_dfields
)
return
;
sprintf
(
str
,
"%sINPUT.MSG"
,
cfg
.
node
_dir
);
sprintf
(
str
,
"%sINPUT.MSG"
,
cfg
.
temp
_dir
);
remove
(
str
);
msgtotxt
(
msg
,
str
,
0
,
1
);
editfile
(
str
);
...
...
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