O'Reilly logo

Spring Python 1.1 by Greg Lee Turnquist

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Issues with customer features

With this version of the features, we have roughed in some useful banking features. However, there are some things that still need to be handled.

  • There is not enough security preventing another customer from accessing Alice's accounts and transferring money away.
  • Withdrawing money from an account has no overdraft protection. This also impacts transfers, because they reuse the withdraw function. A simple solution would be to fail if the requested amount exceeds the balance.
  • Transferring money should be transactional to avoid leaking money.

Securing Alice's accounts

If we log in as Alice, we can view the history of the Checking account.

That is alright. However, if there is another customer, then things are not as secured ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required