The SecOps Group CAP Question Answer
After purchasing an item on an e-commerce website, a user can view their order details by visiting the URL:
https://example.com/?order_id=53870
A security researcher pointed out that by manipulating the order_id value in the URL, a user can view arbitrary orders and sensitive information associated with that order_id. There are two fixes:
(Bob’s Fix): In order to fix this vulnerability, a developer called Bob devised a fix so that the URL does not disclose the numeric value of the order_id but uses a SHA1 hash of the order_id in the URL, such as:
https://example.com/?order_id=1ff0fe6f1599536d1326418124a261bc98b8ea1
Note: that the SHA1 value of 53870 is 1ff0fe6f1599536d1326418124a261bc98b8ea1
(John’s Fix): Another developer called John devised a different fix so that the URL does not disclose the numeric value of the order_id and uses a Base64 encoded value of the order_id in the URL, such as:
https://example.com/?order_id=NTM4NzA=
Note: that the Base64 encoded value of 53870 is NTM4NzA=
Which of the following is correct?