Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Synchronet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
127
Issues
127
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
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
Main
Synchronet
Compare Revisions
4aeba61c3d8eb047ee18d885cce21e471281d357...1a470cc419f2305a2e1dc93a48b67a59db140047
Source
1a470cc419f2305a2e1dc93a48b67a59db140047
Select Git revision
...
Target
4aeba61c3d8eb047ee18d885cce21e471281d357
Select Git revision
Compare
Commits (1)
Always set from_ext when posting a reply. Should resolve issue
#221
(Mortifis).
· 1a470cc4
echicken
authored
Feb 18, 2021
1a470cc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
24 deletions
+11
-24
webv4/lib/forum.js
webv4/lib/forum.js
+11
-24
No files found.
webv4/lib/forum.js
View file @
1a470cc4
...
...
@@ -331,7 +331,7 @@ function get_mail_headers(filter, ascending) {
h
.
attr
&
MSG_READ
?
ret
.
sent
.
read
++
:
(
ret
.
sent
.
unread
++
);
if
(
filter
==
'
sent
'
)
ret
.
headers
.
push
(
h
);
}
if
(
h
.
to_ext
==
user
.
number
)
{
if
(
h
.
to_ext
==
user
.
number
)
{
if
(
is_spam
(
h
))
{
h
.
attr
&
MSG_READ
?
ret
.
spam
.
read
++
:
(
ret
.
spam
.
unread
++
);
if
(
filter
==
'
spam
'
)
ret
.
headers
.
push
(
h
);
...
...
@@ -440,7 +440,7 @@ function getSignature() {
function
postMessage
(
sub
,
header
,
body
)
{
var
ret
=
false
;
if
(
user
.
alias
===
settings
.
guest
||
typeof
msg_area
.
sub
[
sub
]
===
'
undefined
'
||
msg_area
.
sub
[
sub
]
===
undefined
||
!
msg_area
.
sub
[
sub
].
can_post
||
typeof
header
.
to
!==
'
string
'
||
header
.
to
===
''
||
...
...
@@ -475,15 +475,10 @@ function postMessage(sub, header, body) {
// Called by postNew/postReply, not directly
function
postMail
(
header
,
body
)
{
// Lazy ARS checks; we could check the *type* of email being sent, I guess.
if
(
user
.
security
.
restrictions
&
UFLAG_E
||
user
.
security
.
restrictions
&
UFLAG_M
)
{
if
(
user
.
security
.
restrictions
&
UFLAG_E
||
user
.
security
.
restrictions
&
UFLAG_M
)
{
return
false
;
}
if
(
typeof
header
.
to
!==
'
string
'
||
typeof
header
.
subject
!==
'
string
'
||
typeof
body
!==
'
string
'
)
{
if
(
typeof
header
.
to
!==
'
string
'
||
typeof
header
.
subject
!==
'
string
'
||
typeof
body
!==
'
string
'
)
{
return
false
;
}
var
ret
=
false
;
...
...
@@ -537,12 +532,7 @@ function postNew(sub, to, subject, body) {
// Add a new message to 'sub' in reply to parent message 'pid'
function
postReply
(
sub
,
body
,
pid
)
{
var
ret
=
false
;
if
(
typeof
sub
!==
'
string
'
||
typeof
body
!==
'
string
'
||
typeof
pid
!==
'
number
'
)
{
return
ret
;
}
if
(
typeof
sub
!==
'
string
'
||
typeof
body
!==
'
string
'
||
typeof
pid
!==
'
number
'
)
return
ret
;
try
{
var
msgBase
=
new
MsgBase
(
sub
);
msgBase
.
open
();
...
...
@@ -550,15 +540,12 @@ function postReply(sub, body, pid) {
msgBase
.
close
();
if
(
pHeader
===
null
)
return
ret
;
var
header
=
{
'
to
'
:
pHeader
.
from
==
user
.
alias
?
pHeader
.
to
:
pHeader
.
from
,
'
from
'
:
user
.
alias
,
'
subject
'
:
pHeader
.
subject
,
'
thread_id
'
:
(
typeof
pHeader
.
thread_id
===
'
undefined
'
?
pHeader
.
number
:
pHeader
.
thread_id
),
'
thread_back
'
:
pHeader
.
number
to
:
pHeader
.
from
==
user
.
alias
?
pHeader
.
to
:
pHeader
.
from
,
from
:
user
.
alias
,
from_ext
:
user
.
number
,
subject
:
pHeader
.
subject
,
thread_id
:
pHeader
.
thread_id
===
undefined
?
pHeader
.
number
:
pHeader
.
thread_id
,
thread_back
:
pHeader
.
number
,
};
if
(
sub
===
'
mail
'
)
{
if
(
typeof
pHeader
.
from_net_addr
!==
'
undefined
'
)
{
...
...