mirror of
				https://git.jami.net/savoirfairelinux/jami-jams.git
				synced 2025-10-30 07:57:19 +08:00 
			
		
		
		
	Profile Names: Correctly resolve the first and last names.
searchUserProfiles does a LIKE SQL query, which may return multiple user profiles. It then selects the first result, which could belong to a different user with a longer name. e.g. if both Michel and Michelle are registered, Michel is incorrectly resolved as Michelle. GitLab: #135 Change-Id: Ib9bacb8e6cb2fc747ea7d4acd206b0841deea37d
This commit is contained in:
		| @ -35,7 +35,6 @@ import net.jami.jams.dht.DeviceReceiptGenerator; | ||||
|  | ||||
| import java.security.cert.X509Certificate; | ||||
| import java.util.Date; | ||||
| import java.util.Optional; | ||||
|  | ||||
| @Slf4j | ||||
| public class RegisterDeviceFlow { | ||||
| @ -49,8 +48,7 @@ public class RegisterDeviceFlow { | ||||
|                     userAuthenticationModule | ||||
|                             .getAuthSources() | ||||
|                             .get(new AuthModuleKey(user.getRealm(), user.getUserType())) | ||||
|                             .searchUserProfiles(username, "LOGON_NAME", Optional.empty()) | ||||
|                             .get(0); | ||||
|                             .getUserProfile(username); | ||||
|  | ||||
|             // Renew user certificate if expired with same private key | ||||
|             if (!user.getCertificate().getNotAfter().after(new Date())) { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 aeberhardt
					aeberhardt