GUACAMOLE-1239: Make identifier comparison case-insensitive.

This commit is contained in:
Virtually Nick
2023-07-18 17:26:40 -04:00
parent 073d1d476e
commit 4d5101574a
43 changed files with 853 additions and 12 deletions

View File

@@ -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
);
}
}

View File

@@ -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"; }
};
}