Skip to content

Authentication not working #4

@dc42

Description

@dc42

The authentication code never lets my browser session connect to the server. Wireshark shows that it is setting the correct password (reprap) but the server always returns err 1 and WRONG PASSWORD.

Workaround: change the "return false" at the end of function isLoggedIn() to "return true", thereby disabling authentication.

Some issues (possibly related) that I have spotted in the code:

  1. Function logIn() doesn't check whether the IP address is already in the table, but always tries to append it. So I think the table will fill up rapidly if the same IP address tries to connect more than once without logging out in between.
  2. In function logOut(), when it deletes an entry in the table by copying the following table entries down, I think it copies them in the wrong order. If there is more than one entry after the one being deleted, the effect will be to replicate the last entry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions