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

haraka / Haraka / 27032737287

05 Jun 2026 06:26PM UTC coverage: 72.798% (+0.5%) from 72.337%
27032737287

Pull #3598

github

web-flow
Merge 802d635a3 into f1bdc2dcb
Pull Request #3598: remove @haraka/email-address wrapper

1682 of 2206 branches covered (76.25%)

4 of 4 new or added lines in 4 files covered. (100.0%)

66 existing lines in 4 files now uncovered.

7630 of 10481 relevant lines covered (72.8%)

26.34 hits per line

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

70.45
/plugins/auth/flat_file.js
1
// Auth against a flat file
11✔
2

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

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

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

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

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

1✔
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
3✔
36
    }
3✔
37
    next()
3✔
38
}
3✔
39

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

3✔
43
    cb()
3✔
44
}
3✔
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