Skip to content
Snippets Groups Projects
Commit b09b2fc6 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] #1124 `maxPublic` and `maxPrivate` could be null

parent 3587f9eb
No related branches found
No related tags found
No related merge requests found
...@@ -239,6 +239,16 @@ function WebAdmin (duniterServer, startServices, stopServices, listDuniterUIPlug ...@@ -239,6 +239,16 @@ function WebAdmin (duniterServer, startServices, stopServices, listDuniterUIPlug
this.applyNetworkConf = (req) => co(function *() { this.applyNetworkConf = (req) => co(function *() {
yield pluggedConfP; yield pluggedConfP;
const conf = http2raw.conf(req); const conf = http2raw.conf(req);
if (conf.ws2p) {
conf.ws2p.maxPublic = parseInt(conf.ws2p.maxPublic)
conf.ws2p.maxPrivate = parseInt(conf.ws2p.maxPrivate)
if (isNaN(conf.ws2p.maxPublic)) {
conf.ws2p.maxPublic = 10
}
if (isNaN(conf.ws2p.maxPrivate)) {
conf.ws2p.maxPrivate = 10
}
}
yield server.dal.saveConf(_.extend(server.conf, { yield server.dal.saveConf(_.extend(server.conf, {
ws2p: conf.ws2p || null, ws2p: conf.ws2p || null,
nobma: !conf.bma || false, nobma: !conf.bma || false,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment