GUACAMOLE-1239: Make identifier comparison case-insensitive.

This commit is contained in:
Virtually Nick committed 2024-10-02 09:23:27 -04:00
1 parent 073d1d476e
commit 4d5101574a
43 files changed
+853 -12

No files matched your search

@@ -398,5 +398,17 @@ public class PostgreSQLEnvironment extends JDBCEnvironment {
PostgreSQLGuacamoleProperties.POSTGRESQL_ENFORCE_ACCESS_WINDOWS_FOR_ACTIVE_SESSIONS,
true);
}
@Override
public boolean getCaseSensitiveUsernames() throws GuacamoleException {
// By default, PostgreSQL does use case-sensitive string searches, so
// we will honor case-sensitive usernames.
return getProperty(
PostgreSQLGuacamoleProperties.POSTGRESQL_CASE_SENSITIVE_USERNAMES,
true
);
}
}
@@ -314,5 +314,17 @@ public class PostgreSQLGuacamoleProperties {
public String getName() { return "postgresql-batch-size"; }
};
/**
* A property that configures whether or not usernames should be treated as
* case-sensitive with the Postgres JDBC backend.
*/
public static final BooleanGuacamoleProperty POSTGRESQL_CASE_SENSITIVE_USERNAMES =
new BooleanGuacamoleProperty() {
@Override
public String getName() { return "postgresql-case-sensitive-usernames"; }
};
}