Skip to content

Commit

Permalink
Replace uniqid in operation id generation default closure
Browse files Browse the repository at this point in the history
  • Loading branch information
maelanleborgne committed Jul 3, 2024
1 parent a5df37f commit f7e3db6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Builder/Pdf/AbstractPdfBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function __construct(
},
];

$this->operationIdGenerator = static fn (): string => uniqid('gotenberg_', true);
$this->operationIdGenerator = static fn (): string => 'gotenberg_'.bin2hex(random_bytes(16)).microtime(true);
}

public function setLogger(LoggerInterface|null $logger): void
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/Screenshot/AbstractScreenshotBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct(
},
];

$this->operationIdGenerator = fn () => uniqid('gotenberg_', true);
$this->operationIdGenerator = static fn (): string => 'gotenberg_'.bin2hex(random_bytes(16)).microtime(true);
}

public function setLogger(LoggerInterface|null $logger): void
Expand Down

0 comments on commit f7e3db6

Please sign in to comment.