feat(timestamp): add TSA URL validation and sanitization methods

This commit is contained in:
alam00000
2026-07-01 23:23:37 +05:30
parent b09fc21e66
commit b21f602cca
7 changed files with 168 additions and 2 deletions
+15
View File
@@ -28,4 +28,19 @@ export abstract class BaseWorkflowNode extends ClassicPreset.Node {
description: this.description,
};
}
sanitizeControlValue(key: string, value: unknown): unknown {
const control = this.controls[key];
if (!control || typeof control !== 'object' || !('value' in control)) {
return value;
}
const current = (control as { value: unknown }).value;
if (current === null || current === undefined) {
return value;
}
if (typeof value !== typeof current) {
return current;
}
return value;
}
}