Skip to content

This code is insecure, don’t use it! #1

Description

@JuliusPC

Your code contains several security flaws that can and will bite newbies copying the code on their servers.

  • you omit htmlspecialcharsXSS
  • the form is not protected against Cross Site Request Forgery
  • user input is pasted unchecked in the mail’s headers → an attacker could easily send email to other adresses
  • there are libraries for sending email: PHPMailer, SwiftMailer
    There is no reason for implementing such thing by yourself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions