aleitner commented on PR #983: URL: https://github.com/apache/guacamole-client/pull/983#issuecomment-2095087215
> The changes look good to me, but should the scope of this issue be expanded to include other things? For example, the Connection Name is limited to 128 characters - what happens (currently) if someone tries to enter a name longer than that? > > Also, is there anything we can/should do on the fields themselves to check for this, in addition to (but maybe before) the Java code does its check? So, if we put a maximum length parameter on the fields, JavaScript + HTML could do the initial checks and limitations, with the DB verifying that nothing adds up to a value longer than is supported? > > Maybe that's over-complicating things, so I'm fine if the answer is "no," but just thinking out loud... Thanks for the feedback! I agree that we should ensure we handle limits like the one for connection names and parameters properly. For now, I targeted the most pressing issue, which was unclear errors when saving connection parameters that were long enough to cause database truncation errors. Implementing HTML field limits sounds simple at first, but our guacamole client's setup complicates it. We generate the HTML for the connection settings from JSON translation files for each language, like `en.json` and `ja.json`. To add field limits, we'd need a new system for defining these limits outside these files. Alternatively, if we code the checks directly into the controller, we'd end up checking limits for parameters not used by all connections. I feel like keeping this fix focused on server-side error clarity is a simpler first step. For the time being, the current fix should be sufficient in making the error messages better. We can look into adding client-side checks as a separate update later on. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org