Code Monkey home page Code Monkey logo

hotelroombookingproject's Introduction

Session management

Session is a logical connection between a server and a client. It persists over a period of time. When a user logs in the server, the server assigns a unique session identifier to the user. The user transfers the key when it makes requests to the server subsequently, before the session expires.

In this project, github.com/alexedwards/scs is employed for session management.

Middleware

CSRF protection

When someone is clicking an img or something on web1, the attacker "injects" some API of the target website in the img or link. Then, when the img or link is clicked, requests are sent to the target website.

CSRF token can be used to prevent this.

  1. The web application generates a unique CSRF token and associates it with the user's session.
  2. The CSRF token is included in the HTML form or added to JavaScript-generated requests.
  3. When the user submits a form or triggers an action, the CSRF token is sent along with the request.
  4. The web application checks if the CSRF token received matches the one associated with the user's session. If they don't match or the token is missing, the request is considered invalid, and the action is not performed.

SMTP

Mail servers use SMTP to send and receive email. It needs TCP connection to be set up. Process:
(1) establish TCP connection.
(2) Client: send HELLO to identity check, send MAIL representing that a mail needs to be sent. Server sends OK to client.

hotelroombookingproject's People

Contributors

4christinelh4 avatar cris1018 avatar

Watchers

 avatar

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.