mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-07 00:28:39 +01:00
feat(timestamp): add TSA URL validation and sanitization methods
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user