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

Issues with M550/M551 commands to set machine name and password #62

Open
dc42 opened this issue Jun 21, 2014 · 2 comments
Open

Issues with M550/M551 commands to set machine name and password #62

dc42 opened this issue Jun 21, 2014 · 2 comments

Comments

@dc42
Copy link
Contributor

dc42 commented Jun 21, 2014

  1. If the M550 command is used in config.g to set the machine name, and there is a tab character between the machine name and the semicolon that introduces a comment (as added by some users), then the tab character is considered part of the machine name. This causes the rr_name web command to return an invalid json response.
  2. If the machine name in the M550 command contains a double-quote or backslash character, then the rr_name command returns an invalid json response.
  3. If the M551 command is used in config.g to set the password, and there is a tab character between the password and the semicolon that introduces a comment (as added by some users), then the semicolon is considered part of the password. This majes it impossible to match the password.

Fixed in dc42 fork 0.65i release, with an improved fix implemented in 0.65j.

Note: there is also an issue with using M550 or M551 with an uppercase G in the password or machine name, already logged as a different issue.

@RRP-support
Copy link
Collaborator

Thanks David. I think Adrian has worked out a way around the 'G' in names problem, though we haven't test it yet: commit 0.79 3e3dda9
Perhaps extending this to only accept alphanumeric characters would do the job?

RepRapPro tech support

@dc42
Copy link
Contributor Author

dc42 commented Jun 22, 2014

I fixed the issues not relating to 'G' as follows:

  1. When copying a machine name in the M550 command or the password in
    the M551 command, stop at the first control character, then remove any
    trailing spaces. This covers the common case of users putting space or
    tab characters between the name or password and the comment, and I think
    it should cover other cases too.
  2. When generating the response to the rr_name command, escape any " and
    \ characters.

See commits
Duet3D/RepRapFirmware@fe2b31a
and
Duet3D/RepRapFirmware@8169d96.

David Crocker, Escher Technologies Ltd.
http://www.eschertech.com
Tel. +44 (0)20 8144 3265 or +44 (0)7977 211486

On 22/06/2014 11:17, RRP-support wrote:

Thanks David. I think Adrian has worked out a way around the 'G' in
names problem, though we haven't test it yet: commit 0.79 3e3dda9
3e3dda9
Perhaps extending this to only accept alphanumeric characters would do
the job?

RepRapPro tech support


Reply to this email directly or view it on GitHub
#62 (comment).

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

2 participants