pad.libre-service.eu-etherpad/src/node/utils
Muh Muhten 3cedf474e5 Fix misparse of port when binding Unix socket
The hostname:port of URIs used in Minify are currently bogus and refer
to localhost only for historical reasons; there's no reason to retain
them and omitting them avoids generating an invalid URI when "port" is
not an integer.

Context: settings.port is passed to express's listen; if not numeric, it
is used a filename for a Unix domain socket.
This allows e.g. starting a server to be reverse-proxied on a multi-user
system, using the filesystem to handle access control and avoiding need
to allocate port numbers.

Before this change, etherpad-lite starts without error when configured
to listen on a Unix domain socket in this manner. However, `pad.js` and
`ace2_common.js` are generated incorrecting, causing an error
"Uncaught Error: The module at "ep_etherpad-lite/static/js/rjquery" does not exist."
when loading the editor:

When settings.port is a non-numeric string, e.g. `etherpad.sock`, a URI
of the form `http://localhost:etherpad.sock/static/js/rjquery.js` is
generated and parsed to find the file needed. In this case, the file
searched for is `:etherpad.sock/static/js/rjquery.js`, rather than the
expected `static/js/rjquery.js`. No such file exists, and the required
code is silently omitted from the bundle.

As a workaround, hard-code a (meaningless) hostname which can be parsed
correctly, since the current code makes no use of it anyway.
2018-08-10 01:57:30 +02:00
..
Abiword.js remove more dead requires. 2014-12-16 19:10:01 +01:00
caching_middleware.js Fixed path check 2016-06-20 00:22:29 +02:00
Cli.js remove -k argument as it is currently for both sessionkey and apikey 2018-08-09 19:42:14 +02:00
customError.js The Big Renaming - etherpad is now an NPM module 2012-02-26 13:07:51 +01:00
ExportEtherpad.js upgrade to 1.6.5 2018-04-24 12:25:56 +03:00
ExportHelper.js whoops proper regexp fix for listNumber 2015-01-18 23:24:20 +00:00
ExportHtml.js merge with ether/etherpad-lite develop branch 2018-05-21 16:18:40 +03:00
ExportTxt.js Remove unused parameter noDocType. 2016-09-08 09:46:13 -07:00
ImportEtherpad.js make setPadRaw async; streamline .etherpad file import handling chain 2015-04-11 12:02:19 -05:00
ImportHtml.js Fix backend tests with new setText() implementation; tests depended 2015-05-06 08:45:22 -04:00
LibreOffice.js upgrade to 1.6.5 2018-04-24 12:25:56 +03:00
Minify.js Fix misparse of port when binding Unix socket 2018-08-10 01:57:30 +02:00
NodeVersion.js runtime: deprecate Node <= 7. From Etherpad 1.8.0 minimum Node version will be 8 2018-07-28 23:33:24 +02:00
padDiff.js add try-catch clause around calls to applyToAText 2015-02-16 09:01:30 +01:00
path_exists.js Fixed path check 2016-06-20 00:22:29 +02:00
randomstring.js fix randomstring 2014-01-24 01:19:14 +01:00
RemoteAddress.js working handling of setting client ip and anonymizing etc 2014-11-04 23:25:18 +00:00
Settings.js upgrade to 1.6.5 2018-04-24 12:25:56 +03:00
tar.json swap out jquery browser for bower but expose browser object to all pages also enable minification.. Seems to work well 2014-11-22 19:11:35 +00:00
TidyHtml.js Using log4js in TidyHtml 2015-05-18 17:43:46 +01:00
toolbar.js Do not extend Array.prototype 2015-05-22 12:27:08 +02:00