Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED] Fix for location cannot contain dots (ie IP addresses) #733

Open
deajan opened this issue Jul 30, 2019 · 0 comments
Open

[SOLVED] Fix for location cannot contain dots (ie IP addresses) #733

deajan opened this issue Jul 30, 2019 · 0 comments

Comments

@deajan
Copy link

deajan commented Jul 30, 2019

When using GateOne direct URL (eg via LibreNMS or other), location string may not contain dots or it may lead to the following:

Example URI: https://gatone.local:8443/?ssh=ssh://10.0.10.1&location=10.0.10.1

/static/gateone.js:973 Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#go_10.0.10.1_error_message' is not a valid selector.
    at Object.getNode (/static/gateone.js:973:35)
    at Object.connect (/static/gateone.js:2600:27)
    at parseResponse (/static/gateone.js:464:28)
    at XMLHttpRequest.http.onreadystatechange (/static/gateone.js:1727:17)

In order to fix that DOMException, easiest way is to modifiy /static/gateone.js

On my CentOS 7 setup:
/usr/lib/python2.7/site-packages/gateone-1.2.0-py2.7.egg/gateone/static/gateone.js

One line 478, replace the line:

 go.prefs.prefix += go.location + '_';

with:

go.prefs.prefix += go.location.replace(/\./g, 'dot') + '_';

which will repace dots with litteral word "dot" on location.

Hope this helps somebody else ;)

@deajan deajan changed the title [SOLVED] Fix for location cannot contain dots [SOLVED] Fix for location cannot contain dots (ie IP addresses) Jul 30, 2019
ntaken added a commit to ntaken/GateOne that referenced this issue Sep 25, 2020
[SOLVED] Fix for location cannot contain dots (ie IP addresses) liftoff#733
liftoff#733
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant