You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I harvested nodeid from an agent with the command HEX_VALUE=$(sudo /usr/local/mesh_services/meshagent/meshagent -nodeid)
I converted this value to Base64 with the command NODE_ID=$(echo "$HEX_VALUE" | xxd -r -p | base64)
This value includes '+' and '/' characters, so I would presumably convert them to '-' & '_' respectively to meet Base64URL standard, but the actual nodeID used in the web app and meshctrl.js seems to swap in the characters '@' & '$' (respectively) for the illegal characters instead.
Is this intended behavior? Is this documented anywhere? Very few references to the meshagent -nodeid even mention that it /isn't/ a ready to use value but a Hex value, and I'm not familiar with base64url encoding acting this way.
you have to simply replace values with the correct things to get the correct nodeid
this is my nodejs code which might help you #5202 (comment)
i always wondered why -nodeid never returned the actually nodeid but it required the hex value which still needs to be base64 encoded and then values replaced
Yes, I meant to update this ticket, I changed my script to use the statement: meshNodeID=$(sudo /usr/local/mesh_services/meshagent/meshagent -nodeid | xxd -r -p | base64 | tr '/+' '$@')
and that provided the correct node id for my purposes. I was mostly checking whether this was intended behavior, given the hex output and seemingly non-standard base64 formatting.
It seemed like there was probably a reason for using this encoding instead of standard base64URL, but it's not an encoding I've ever seen before, and I wasn't sure whether it was bespoke. Thank you for switching it to a question, btw, I didn't see a way to submit it as a question myself.
Describe the bug
I harvested nodeid from an agent with the command
HEX_VALUE=$(sudo /usr/local/mesh_services/meshagent/meshagent -nodeid)
I converted this value to Base64 with the command
NODE_ID=$(echo "$HEX_VALUE" | xxd -r -p | base64)
This value includes '+' and '/' characters, so I would presumably convert them to '-' & '_' respectively to meet Base64URL standard, but the actual nodeID used in the web app and meshctrl.js seems to swap in the characters '@' & '$' (respectively) for the illegal characters instead.
Is this intended behavior? Is this documented anywhere? Very few references to the
meshagent -nodeid
even mention that it /isn't/ a ready to use value but a Hex value, and I'm not familiar with base64url encoding acting this way.To Reproduce
Steps to reproduce the behavior:
sudo /usr/local/mesh_services/meshagent/meshagent -nodeid | xxd -r -p | base64
Expected behavior
$HEX_VALUE
=base64=>
SpN4i+bpu/bM
=base64URL=>
SpN4i-bpu_bM
=In URL=>
mesh.com/?gotonode=SpN4i-bpu_bM
Actual URL:
mesh.com/?gotonode=SpN4i@bpu$bM
Server Software:
Client Device:
Not Applicable
Remote Devices:
Your config.json file
The text was updated successfully, but these errors were encountered: