Page MenuHomePhabricator

Aphlict option parsing for empty values
Closed, DuplicatePublic


Some environments use port 80/443 for web traffic exclusively, with port 80 being a 301/302 redirect to the HTTPS port 443.

Such a scenario prevents the visitor from also connecting to the Aphlict notification server, which listens on a different port or address. This may work fine for distributed Phabricator clusters, but for a stand-alone environment creates the following scenario:

As a result, Aphlict is started with an undetermined port to listen on for client connections, with the literal string --client-port=.

The default spells the default for config['client-port'] = 22280, but the default does not kick in for the following command-line:

$ support/aphlict/server/aphlict_server.js --client-port= --admin-port=22281 --admin-host=localhost --log=/var/log/phabricator/aphlict.log

The proposal is to test if (matches[2]) before issuing config[matches[1]] = matches[2].