This commit is contained in:
Naden
2026-04-25 05:11:15 +07:00
parent 8beaae7547
commit 964ff3a547
3 changed files with 243 additions and 4 deletions

View File

@@ -29,12 +29,12 @@ class PersonelController extends BaseController
$nrp = $inputNrp;
if (!is_numeric($inputNrp)) {
try {
$nrp = DhivaAES::base64url_decode($inputNrp);
if (!$nrp) {
$nrp = $inputNrp; // Fallback to original if decryption fails
$decrypted = DhivaAES::base64url_decode($inputNrp);
if ($decrypted !== false && !empty($decrypted)) {
$nrp = $decrypted;
}
} catch (\Exception $e) {
$nrp = $inputNrp;
// Keep original if crash
}
}