PHP Security: XSS (Cross-site Scripting)

Поділитися
Вставка
  • Опубліковано 3 жов 2024
  • Want more? Explore the library at www.codecourse...
    Official site
    www.codecourse...
    Twitter
    / teamcodecourse

КОМЕНТАРІ • 39

  • @cavking1
    @cavking1 Рік тому

    You taught me php over ten years ago and still use it today. Thanks Alex

  • @IgorAherne
    @IgorAherne 7 років тому

    Damnit, I am writing a database, and just whistle in fear the end of each video.
    For example, where you expose the prevented javascript for example, it's actually scary how it would go through so quickly and unnoticed.. Thanks!

  • @zezont4
    @zezont4 9 років тому +1

    Really important and easy.
    Thank you

  • @AlexanderGarzon
    @AlexanderGarzon 9 років тому

    simple, but quite precise. Nice video.

  • @MartinKuikHilversum
    @MartinKuikHilversum 7 років тому

    Nice work bro i was searching for this u helped me alot !

  • @victhour
    @victhour 9 років тому +1

    man! like your reading my mind, nice tutorial.

  • @sanauwari
    @sanauwari 6 років тому

    Finally got it what am I looking for😊Thanku very much

  • @TeeWoTeebay
    @TeeWoTeebay 9 років тому

    Nice and easy! Thanks Alex.

  • @mysterion4105
    @mysterion4105 9 років тому

    Thanks for the vídeo Alex, hope you upload other kind of attacks.

  • @MohamedAliUrd
    @MohamedAliUrd 9 років тому +2

    you are the best

  • @SinghatehAlagie
    @SinghatehAlagie 6 років тому

    hello sir, I come across your video while I was trying to fix my cookie problem. when I inserted my cookies into the database and if I want to see them all in my cookie model I show your cart is empty while inside my database is having some products already inserted into them. could you please help me to fix that please or I can even send you the code to check it for me if necessary? thank you so much waiting to hear from you soon as possible.

  • @NoJackals
    @NoJackals 9 років тому

    Why other videos of php security list are private?

  • @WouterDijkstra3119
    @WouterDijkstra3119 9 років тому

    Why not sanitize the data before entering the DB, I know you said something about it, but if you use htmlspecialchars or htmlentities before entering the DB I don't see why not do it before, rather than after?

    • @aidantwoods
      @aidantwoods 8 років тому

      +Wouter Dijkstra If you sanitise the data before it reaches the DB, then messing up once will leave you vulnerable everywhere the malicious data is displayed. If you sanitise as things come out, then you'll limit your exposure to where you messed up.
      Additionally, if you sanitise before then a screw up is harder to fix, because your security model relies on the database being trusted not to have executable html inside it. A single screw up invalidates that assumption, and you'd have to find every piece of malicious data in the DB before you'd be safe - even after fixing the flawed form.
      If you sanitise after, then to remove an exploit all you have to do is fix the vulnerable page. Then it won't matter if there is malicious html in the DB, because it won't be able to execute.
      When outputting data, just ask yourself whether the data really needs the ability to execute as html. If the answer is no, run it through the sanitisation function.

  • @gungorbudak
    @gungorbudak 9 років тому

    Can anybody tell me what MySQL software here is to see and edit table rows?

  • @hamedtech7260
    @hamedtech7260 6 років тому

    very helpful
    :)

  • @ialimijororakotoniaina3274
    @ialimijororakotoniaina3274 9 років тому

    very helpful

  •  5 років тому

    Time when Alex was so underrated. 'Member?

  • @tsochetra
    @tsochetra 9 років тому

    can i escape value before insert to db ?

  • @bcrypted
    @bcrypted 7 років тому

    Is this still applies? or what will be the equivalent from 2015 to current year 2017?
    What version of PHP are you using in this videos?

  • @Dexter101x
    @Dexter101x 8 років тому

    What if they don't use cookie?

  • @abdullahislam
    @abdullahislam 9 років тому +1

    So what about scripts we embed on our sites like facebook like box or a youtube embed? Can they potentially also steal cookies?

  • @meksaldi
    @meksaldi 9 років тому

    +Codecourse Noticed that in the functions.php file you did not closed the ?> file at the end, is this the way it should?

    • @derkjna
      @derkjna 9 років тому +2

      +meksaldi If a php file is include inside a other php file it isn't required to close PHP. Closing PHP while it is included in a other file could actually give you an error

    • @meksaldi
      @meksaldi 9 років тому

      Exactly what I thought :) Thanks for the verification :

    • @Sonnentau1
      @Sonnentau1 9 років тому +2

      you should use 'require_once' anyway... thats better and saver.

    • @meksaldi
      @meksaldi 9 років тому

      +Manolis Agkopian Ok re Manoli, euxaristw very much :D

  • @devexe3545
    @devexe3545 9 років тому

    ORM or PDO this will protect you from SQL injection.
    Twig or Smarty template framework This will protect you from XSS
    Token this will protect you from CSRF

  • @royhonders
    @royhonders 9 років тому

    What software for the database is he/are you using?

    • @chillybinvids
      @chillybinvids 9 років тому +1

      +Veslav I believe he uses Sequel Pro. If using Windows try HeidiSQL.

  • @MrAliiraqi1
    @MrAliiraqi1 8 років тому

    hi , Alex what u using editor

  • @OJeyjunior
    @OJeyjunior 4 роки тому

    SAMY IS MY HERO

  • @JasonCtutorials
    @JasonCtutorials 9 років тому

    this won't work on modern websites for php. LOLs.