GithubHelp home page GithubHelp logo

marcpage / financial_game Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 221 KB

Website that hosts a real-life financial game

License: The Unlicense

Python 96.39% Mako 2.45% JavaScript 0.72% CSS 0.44%

financial_game's People

Contributors

dependabot[bot] avatar marcpage avatar

Stargazers

 avatar

Watchers

 avatar

financial_game's Issues

Database location should be configured

Currently the database is hardcoded to an sqlite3 db in the objects directory. This should be configured and not hardcoded.

See financial_game/__main__.py

Session Key cookie needs to be secure

We should set the following cookie attributes:

  • Secure (may need to be only if server is in deployed mode)
  • HttpOnly
  • SameSite
  • Expire
  • Max-Age

From: https://blog.jscrambler.com/best-practices-for-secure-session-management-in-node
Cookies can be secured using the following attributes:

  1. The Secure attribute instructs the browser to set cookies over HTTPS only. This attribute prevents MITM attacks since the transfer is over TLS.
  2. The HttpOnly attribute blocks the ability to use the document.cookie object. This prevents XSS attacks from stealing the session identifier.
  3. The SameSite attribute blocks the ability to send a cookie in a cross-origin request. This provides limited protection against CSRF attacks.
  4. Setting Domain & Path attributes can limit the exposure of a cookie. By default, Domain should not be set and Path should be restricted.
  5. Expire & Max-Age allow us to set the persistence of a cookie.

SQLAlchemy throws a warning

The warning is:

financial_game/model.py:14: MovedIn20Warning: The ``declarative_base()`` function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 1.4) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)

Alchemy_Base = sqlalchemy.ext.declarative.declarative_base()

The code should be updated so this is not shown

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.