Don't accept PNI as ACI in contact sync
This commit is contained in:
parent
da113c1fa1
commit
ca45a9cf74
3 changed files with 46 additions and 26 deletions
|
@ -5,6 +5,7 @@ import type { AciString } from '../types/ServiceId';
|
|||
import type { LoggerType } from '../types/Logging';
|
||||
import * as log from '../logging/log';
|
||||
import { isAciString } from './isAciString';
|
||||
import { strictAssert } from './assert';
|
||||
|
||||
export function normalizeAci(
|
||||
rawAci: string,
|
||||
|
@ -28,6 +29,7 @@ export function normalizeAci(
|
|||
}
|
||||
|
||||
const result = rawAci.toLowerCase();
|
||||
strictAssert(!result.startsWith('pni:'), 'ACI should not start with PNI:');
|
||||
|
||||
if (!isAciString(result)) {
|
||||
logger.warn(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue