necouchman commented on PR #902:
URL: https://github.com/apache/guacamole-client/pull/902#issuecomment-2351114864

   > > > @jmuehlner or @mike-jumper Ping on this one, so I can either clean it 
up for 1.6.0, or de-scope it if we need to. I'd rather it make it into this 
release if at all possible...
   > > 
   > > 
   > > I'm fine with the idea of offering an option to enable case-insensitive 
comparison, and just let it use the default case sensitiy behavior of the 
database otherwise. I think this would cover 95% of the use case of this 
feature.
   > > I'm fine with including this in 1.6.0 if it's ready.
   > 
   > Okay, I think it's ready for review. The gist of the changes is:
   > 
   > * I've added case-insensitive comparisons across the board for the various 
extensions and guacamole-ext items.
   > * For PostgreSQL, specifically, I've added the capability to do 
case-insensitive queries for usernames.
   > * I've left the queries in MySQL and SQL Server alone - they are already 
case-insensitive, and I've avoided any work to try to make them behave in a 
case sensitive fashion due to the challenges mentioned above. There's also a 
warning that will be logged for the MySQL and SQL Server extensions when the 
`getCaseSensitiveUsernames()` method is called. I don't know if this is 
necessary or helpful, but I didn't want someone to try to throw 
"sql-server-case-sensitive-usernames: true" into their properties file and 
wonder why it doesn't work.
   
   Well, I changed my mind a bit and went a slightly different route that I 
believe is more consistent across the modules:
   * I've implemented the case-insensitive searching across all the JDBC 
modules using the `LOWER()` method.
   * MySQL and SQL Server modules still default to `false` for the 
case-sensitivity; PostgreSQL defaults to `true` with the additional comments 
regarding the reason for that.
   
   My thought process (now) is that the modules will behave as they have been 
(principle of least surprise). However, should an admin, for some reason or 
another, want to change the database collation for either SQL Server or MySQL 
to one that does case-sensitive string comparisons, they need only enable it 
and it will work as expected (as PostgreSQL does). This also keeps the queries 
fairly consistent across each of the DB modules.


-- 
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

Reply via email to