Open TWiStErRob opened 10 years ago
Hi @TWiStErRob and thanks for your detailed issue.
Think your fix reasonable, and asked myself why we haven't done it that way before. However, removeCredentials
is in there but no longer used by the functions (as of RC4). Which version of node-neo4j are you using, so i can better verify how and what to fix.
Best, Phil
Here's a temporary fix I applied in my own codebase to make
addNodeId
work:The problem came up when I started using www.graphenedb.com, it automatically generates passwords like this:
http://my-db:35Ghdk3j5hfivmb@mydb.sb01.stations.graphenedb.com:12345
Also note that most usernames can contain dash and underscore, and the "more secure" passwords can contain weird characters like: !, *, $, % etc. These weird characters are working when connecting using
new neo4j(<url>)
, the trick is to escape them via%xx
.The above monkeypatch works as is, but I think it would be nice if a library didn't assume anything about the username and password of an application. Also my guess is that it is possible to use international hostnames as well.
So to be open I'd suggest something like:
... and probably do
removeCredentials
in the constructor and cache it.