Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
c868d6de
Commit
c868d6de
authored
Oct 03, 2016
by
Dave Cridland
Committed by
GitHub
Oct 03, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #645 from guusdk/OF-777_EmailService-fix
OF-777: email service fixes
parents
25a1741c
d50e6cd4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
openfire_i18n_en.properties
src/i18n/openfire_i18n_en.properties
+1
-1
system-email.jsp
src/web/system-email.jsp
+4
-2
No files found.
src/i18n/openfire_i18n_en.properties
View file @
c868d6de
...
@@ -2614,7 +2614,7 @@ system.email.info=Use the form below to set the host and port of your email serv
...
@@ -2614,7 +2614,7 @@ system.email.info=Use the form below to set the host and port of your email serv
on your mail server. Note, if you choose to enable mail debugging the debug output will be written
\
on your mail server. Note, if you choose to enable mail debugging the debug output will be written
\
to your appserver's standard out log.
to your appserver's standard out log.
system.email.update_success
=
SMTP settings updated successfully.
system.email.update_success
=
SMTP settings updated successfully.
system.email.update_failure
=
An error occured. Please verify that you have filled out all required fields
\
system.email.update_failure
=
An error occur
r
ed. Please verify that you have filled out all required fields
\
correctly and try again.
correctly and try again.
system.email.name
=
SMTP Settings
system.email.name
=
SMTP Settings
system.email.mail_host
=
Mail Host
system.email.mail_host
=
Mail Host
...
...
src/web/system-email.jsp
View file @
c868d6de
...
@@ -39,8 +39,11 @@
...
@@ -39,8 +39,11 @@
Cookie
csrfCookie
=
CookieUtils
.
getCookie
(
request
,
"csrf"
);
Cookie
csrfCookie
=
CookieUtils
.
getCookie
(
request
,
"csrf"
);
String
csrfParam
=
ParamUtils
.
getParameter
(
request
,
"csrf"
);
String
csrfParam
=
ParamUtils
.
getParameter
(
request
,
"csrf"
);
Map
<
String
,
String
>
errors
=
new
HashMap
<
String
,
String
>
();
if
(
save
)
{
if
(
save
)
{
if
(
csrfCookie
==
null
||
csrfParam
==
null
||
!
csrfCookie
.
getValue
().
equals
(
csrfParam
))
{
if
(
csrfCookie
==
null
||
csrfParam
==
null
||
!
csrfCookie
.
getValue
().
equals
(
csrfParam
))
{
errors
.
put
(
"csrf"
,
"CSRF Failure!"
);
save
=
false
;
save
=
false
;
}
}
}
}
...
@@ -55,7 +58,6 @@
...
@@ -55,7 +58,6 @@
EmailService
service
=
EmailService
.
getInstance
();
EmailService
service
=
EmailService
.
getInstance
();
// Save the email settings if requested
// Save the email settings if requested
Map
<
String
,
String
>
errors
=
new
HashMap
<
String
,
String
>
();
if
(
save
)
{
if
(
save
)
{
if
(
host
!=
null
)
{
if
(
host
!=
null
)
{
service
.
setHost
(
host
);
service
.
setHost
(
host
);
...
@@ -234,7 +236,7 @@
...
@@ -234,7 +236,7 @@
</tr>
</tr>
</table>
</table>
</div>
</div>
<input
type=
"hidden"
name=
"csrf"
value=
"${csrf}"
/>
<input
type=
"submit"
name=
"save"
value=
"
<fmt:message
key=
"system.email.save"
/>
"
>
<input
type=
"submit"
name=
"save"
value=
"
<fmt:message
key=
"system.email.save"
/>
"
>
<input
type=
"submit"
name=
"test"
value=
"
<fmt:message
key=
"system.email.send_test"
/>
"
>
<input
type=
"submit"
name=
"test"
value=
"
<fmt:message
key=
"system.email.send_test"
/>
"
>
</form>
</form>
...
...
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