rage / cyber-security-base-19

https://introduction-to-cyber-security.now.sh
80 stars 46 forks source link

Bank transfer allows sender and receiver be the same account #27

Open lauripalonen opened 3 years ago

lauripalonen commented 3 years ago

In Bank transfer exercise (Securing software, module 2.2.), it is possible for the sender and receiver be the same account. This enables incrementation of balance of a single account, while logically it should stay the same (take amount X from account A, give amount X to account A).

Suggestion: Add a test for checking that transaction is not made if sender == receiver.