Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved create user miss validation check

    Support
    user management userinterface
    2
    3
    94
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • potemkin_ai
      potemkin_ai last edited by girish

      If I try to create user with _ in username, it silently fails, dropping the following error in the console:

      (anonymous) @ angular.js:12011
      n @ angular.js:11776
      (anonymous) @ angular.js:11571
      (anonymous) @ angular.js:16383
      $eval @ angular.js:17682
      $digest @ angular.js:17495
      $apply @ angular.js:17790
      (anonymous) @ angular.js:25890
      dispatch @ jquery.min.js?32d97f9ffba9ba7a989d8ef52be913efb0d20946:3
      r.handle @ jquery.min.js?32d97f9ffba9ba7a989d8ef52be913efb0d20946:3
      angular.js:13920 TypeError: Cannot read properties of undefined (reading '$setPristine')
          at users.js:355:1
          at client.js:1855:1
          at client.js:282:1
          at angular.js:11486:13
          at angular.js:16383:28
          at m.$eval (angular.js:17682:16)
          at m.$digest (angular.js:17495:15)
          at m.$apply (angular.js:17790:13)
          at l (angular.js:11831:36)
          at J (angular.js:12033:7)
      

      After POST to api/v1/users (error code 400).

      Since no where in the form it says that username can't have underline, it's non-trivial to figure out what went wrong.

      I guess it would be nice to have a text description in the form or, better, an input verification check, so that I couldn't make this mistake.

      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        Great catch. I have fixed up the UI now for the next release to actually show the correct error message next to the username field.

        potemkin_ai 1 Reply Last reply Reply Quote 0
        • Topic has been marked as a question  nebulon nebulon 
        • Topic has been marked as solved  nebulon nebulon 
        • potemkin_ai
          potemkin_ai @nebulon last edited by

          @nebulon Thanks! 🙂

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB