Fix errors found by elliot
parent
52452a7c8d
commit
5dab1158e9
|
@ -23,7 +23,7 @@ router.get('^/:address([^@/]+@[^@/]+)', sanitizeAddress, (req, res, _next) => {
|
|||
})
|
||||
|
||||
router.get(
|
||||
'^/:address/:uid([0-9]+$)',
|
||||
'^/:address/:uid([0-9]+)',
|
||||
sanitizeAddress,
|
||||
async (req, res, next) => {
|
||||
try {
|
||||
|
@ -33,7 +33,6 @@ router.get(
|
|||
req.params.uid
|
||||
)
|
||||
if (mail) {
|
||||
|
||||
// Set a default subject if none is present
|
||||
if (!mail.subject) {
|
||||
mail.subject = 'No Subject'
|
||||
|
@ -102,7 +101,7 @@ router.get(
|
|||
)
|
||||
|
||||
router.get(
|
||||
'^/:address/:uid/:checksum([a-f0-9]+$)',
|
||||
'^/:address/:uid/:checksum([a-f0-9]+)',
|
||||
sanitizeAddress,
|
||||
async (req, res, next) => {
|
||||
try {
|
||||
|
@ -155,8 +154,8 @@ router.get(
|
|||
req.params.uid,
|
||||
true
|
||||
)
|
||||
mail = mail.replace(/(?:\r\n|\r|\n)/g, '<br>')
|
||||
if (mail) {
|
||||
mail = mail.replace(/(?:\r\n|\r|\n)/g, '<br>')
|
||||
// Emails are immutable, cache if found
|
||||
res.set('Cache-Control', 'private, max-age=600')
|
||||
res.render('raw', {
|
||||
|
|
|
@ -38,10 +38,10 @@ router.post(
|
|||
const errors = validationResult(req)
|
||||
if (!errors.isEmpty()) {
|
||||
return res.render('login', {
|
||||
title: 'Login',
|
||||
username: req.body.username,
|
||||
domain: req.body.domain,
|
||||
userInputError: true,
|
||||
title: `${config.http.branding[0]} | Your temporary Inbox`,
|
||||
username: randomWord(),
|
||||
domains: config.email.domains,
|
||||
madeby: config.http.branding[1],
|
||||
madebysite: config.http.branding[2]
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue