• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

haraka / Haraka / 26968582709

04 Jun 2026 05:33PM UTC coverage: 72.442% (-0.2%) from 72.622%
26968582709

push

github

web-flow
update CHANGELOG (#3594)

1678 of 2213 branches covered (75.82%)

2 of 2 new or added lines in 1 file covered. (100.0%)

48 existing lines in 5 files now uncovered.

7639 of 10545 relevant lines covered (72.44%)

25.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.82
/plugins/auth/flat_file.js
1
// Auth against a flat file
6✔
2

6✔
3
exports.register = function () {
6✔
4
    this.inherits('auth/auth_base')
6✔
5
    this.load_flat_ini()
6✔
6

6✔
7
    if (this.cfg.core.constrain_sender) {
6✔
8
        this.register_hook('mail', 'constrain_sender')
6✔
9
    }
6✔
10
}
6✔
11

6✔
12
exports.load_flat_ini = function () {
6✔
13
    this.cfg = this.config.get(
6✔
14
        'auth_flat_file.ini',
6✔
15
        {
6✔
16
            booleans: ['+core.constrain_sender'],
6✔
17
        },
6✔
18
        () => {
6✔
19
            this.load_flat_ini()
6✔
20
        },
×
21
    )
×
22

×
23
    if (this.cfg.users === undefined) this.cfg.users = {}
6!
24
}
×
25

×
26
exports.hook_capabilities = function (next, connection) {
6✔
27
    if (!connection.remote.is_private && !connection.tls.enabled) {
5!
28
        connection.logdebug(this, 'Auth disabled for insecure public connection')
5!
UNCOV
29
        return next()
×
UNCOV
30
    }
×
UNCOV
31

×
32
    const methods = this.cfg.core?.methods ? this.cfg.core.methods.split(',') : null
5✔
33
    if (methods && methods.length > 0) {
5!
34
        connection.capabilities.push(`AUTH ${methods.join(' ')}`)
5✔
35
        connection.notes.allowed_auth_methods = methods
5✔
36
    }
5✔
37
    next()
5✔
38
}
5✔
39

5✔
40
exports.get_plain_passwd = function (user, connection, cb) {
6✔
41
    if (this.cfg.users[user]) return cb(this.cfg.users[user].toString())
2✔
42

2✔
43
    cb()
2✔
44
}
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc