Skip to content

Commit 0c88f7f

Browse files
committed
Trivial improvement
1 parent 4c28867 commit 0c88f7f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/main/java/org/t246osslab/easybuggy/core/utils/EmailUtils.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ public class EmailUtils {
3030

3131
private static final Logger log = LoggerFactory.getLogger(EmailUtils.class);
3232

33+
// squid:S1118: Utility classes should not have public constructors
34+
private EmailUtils() {
35+
throw new IllegalAccessError("Utility class");
36+
}
37+
3338
public static boolean isReadyToSendEmail() {
3439
if (ApplicationUtils.getSmtpHost() == null || "".equals(ApplicationUtils.getSmtpHost())
3540
|| ApplicationUtils.getSmtpPort() == null || "".equals(ApplicationUtils.getSmtpPort())

src/main/java/org/t246osslab/easybuggy/vulnerabilities/MailHeaderInjectionServlet.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws Ser
6565
+ MessageUtils.getMsg("label.submit", locale) + "\"/></td>");
6666
bodyHtml.append("</tr>");
6767
bodyHtml.append("</table>");
68+
bodyHtml.append("<br>");
6869
bodyHtml.append(MessageUtils.getMsg("msg.note.mail.header.injection", locale));
6970
if (req.getAttribute("message") != null) {
7071
bodyHtml.append("<br><br>");

0 commit comments

Comments
 (0)