Bug bounty: Bypass Limits via Race Conditions

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 4

  • @DevSecHacker
    @DevSecHacker  7 місяців тому

    if you want to support my work:
    www.buymeacoffee.com/devsechacker

  • @pavanreddynamala8675
    @pavanreddynamala8675 9 місяців тому +1

    Thanks for the video now I got the clarity on race conditions.

  • @ashutoshagrawal7871
    @ashutoshagrawal7871 9 місяців тому

    What's the remedy to the situation?

    • @DevSecHacker
      @DevSecHacker  9 місяців тому

      we need to implement proper synchronization mechanisms to ensure the correct and secure execution of code in multi-threaded or concurrent environments.
      For achieving it
      1. we need to implement atomic operations designed to be executed as a single, uninterruptible unit, preventing race conditions.
      2. locking mechanisms which Locks ensure that only one thread can access a shared resource at a time.
      In our case, findOneAndUpdate mongo query will help to prevent this.
      refer this for detailed understanding
      medium.com/@codersauthority/handling-race-conditions-and-concurrent-resource-updates-in-node-and-mongodb-by-performing-atomic-9f1a902bd5fa