Sfoglia il codice sorgente

漏洞修复-fs-admin 直接返回未脱敏完整身份证号)

wjj 2 giorni fa
parent
commit
bba190ecf9

+ 3 - 0
fs-admin/src/main/java/com/fs/his/controller/FsPrescribeController.java

@@ -184,6 +184,9 @@ public class FsPrescribeController extends BaseController
     {
         FsPatient fsPatient = fsPatientMapper.selectFsPatientByPatientId(orderId);
         String idCard = fsPatient.getIdCard();
+        if (idCard != null) {
+            idCard = idCard.replaceAll("(\\d{4})\\d{10}(\\w{4})", "$1**********$2");
+        }
         return R.ok().put("data",idCard);
     }