mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-641: Index records by username ONLY if not related to a hostname.
Doing otherwise would mean that a particular user would never be able to be associated with a specific password/key by their username if they have any explicit server-specific account.
This commit is contained in:
@@ -238,11 +238,15 @@ public class KsmClient {
|
|||||||
// Store based on UID ...
|
// Store based on UID ...
|
||||||
cachedRecordsByUid.put(record.getRecordUid(), record);
|
cachedRecordsByUid.put(record.getRecordUid(), record);
|
||||||
|
|
||||||
// ... and hostname/address ...
|
// ... and hostname/address
|
||||||
addRecordForHost(record, recordService.getHostname(record));
|
String hostname = recordService.getHostname(record);
|
||||||
|
addRecordForHost(record, hostname);
|
||||||
|
|
||||||
// ... and username
|
// Store based on username ONLY if no hostname (will otherwise
|
||||||
addRecordForLogin(record, recordService.getUsername(record));
|
// result in ambiguous entries for servers tied to identical
|
||||||
|
// accounts)
|
||||||
|
if (hostname == null)
|
||||||
|
addRecordForLogin(record, recordService.getUsername(record));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user