webdevRefinery Forum: Need an idea for an awesome Node project? - webdevRefinery Forum

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

User is offline callumacrae 

  • {{ post.author }}
  • Group: Members
  • Posts: 2867
  • Joined: 20-January 11
  • LocationWarwickshire, England
  • Expertise:HTML,CSS,PHP,Javascript,Node.js,SQL

Posted 08 July 2012 - 12:05 PM (#41)

That's the difference between .text and .html, yes ;-)
Front-end developer and writer
Twitter | GitHub | phpBB Contributor and Website Team Member | lynxphp
0


User is offline TheMaster 

  • *-c0de master-*
  • Group: Members
  • Posts: 763
  • Joined: 24-May 10
  • LocationAustralia
  • Expertise:HTML,CSS,PHP,Java

Posted 08 July 2012 - 05:56 PM (#42)

Wait so, don't XSS and SQL work on the same concept of unescaped quotes, or am I completely misunderstanding XSS?
0


User is offline Kyek 

  • Founder of wdR
  • Group: Administrators
  • Posts: 5081
  • Joined: 20-February 10
  • LocationPhiladelphia, PA, USA
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL

Posted 08 July 2012 - 06:45 PM (#43)

XSS generally (but not always) works because of < and > not being changed into HTML entities. But it's not just plugging things into HTML. The best ones take advantage of exec() calls in the JavaScript, for example. Or by overriding AJAX URLs.
0


User is offline @Tom 

  • space
  • Group: Members
  • Posts: 707
  • Joined: 24-May 11
  • Locationspace
  • Expertise:Python

Posted 08 July 2012 - 08:24 PM (#44)

Hey kyek, you should write a tutorial on protecting yourself from xss specifically for node.js apps.
ocelotapps.com
jr wdR comedian under ThatRailsGuy

View Postarronhunt, on 30 June 2012 - 10:09 PM, said:

Sir you are the first person to make me piss myself laughing. Kudos.
0


User is offline soulcyon 

  • 兄貴 シャンク
  • Group: Members
  • Posts: 1598
  • Joined: 14-April 10
  • LocationNew Brunswick, NJ
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,Graphics,MongoDB,CouchDB

Posted 08 July 2012 - 09:27 PM (#45)

Hacking web servers 101 by Kyek, me likey
Posted Image
0


User is offline @Tom 

  • space
  • Group: Members
  • Posts: 707
  • Joined: 24-May 11
  • Locationspace
  • Expertise:Python

Posted 08 July 2012 - 10:10 PM (#46)

View Postsoulcyon, on 08 July 2012 - 09:27 PM, said:

Hacking web servers 101 by Kyek, me likey

Mine said PROTECTING against
ocelotapps.com
jr wdR comedian under ThatRailsGuy

View Postarronhunt, on 30 June 2012 - 10:09 PM, said:

Sir you are the first person to make me piss myself laughing. Kudos.
0


User is offline callumacrae 

  • {{ post.author }}
  • Group: Members
  • Posts: 2867
  • Joined: 20-January 11
  • LocationWarwickshire, England
  • Expertise:HTML,CSS,PHP,Javascript,Node.js,SQL

Posted 09 July 2012 - 12:38 AM (#47)

View Postitom07, on 08 July 2012 - 08:24 PM, said:

Hey kyek, you should write a tutorial on protecting yourself from xss specifically for node.js apps.

http://lynxphp.com/s...site-scripting/
Front-end developer and writer
Twitter | GitHub | phpBB Contributor and Website Team Member | lynxphp
0


User is offline @Tom 

  • space
  • Group: Members
  • Posts: 707
  • Joined: 24-May 11
  • Locationspace
  • Expertise:Python

Posted 13 July 2012 - 12:40 PM (#48)

Not a bad read callum, could you post a node version. Instead of in php
ocelotapps.com
jr wdR comedian under ThatRailsGuy

View Postarronhunt, on 30 June 2012 - 10:09 PM, said:

Sir you are the first person to make me piss myself laughing. Kudos.
0


User is online Cyril 

  • Group: Members
  • Posts: 2544
  • Joined: 03-August 10
  • Expertise:HTML,CSS,PHP,Javascript,Graphics

Posted 13 July 2012 - 01:00 PM (#49)

View Postitom07, on 13 July 2012 - 12:40 PM, said:

Not a bad read callum, could you post a node version. Instead of in php


You should probably learn JS properly if you don't understand how to implement that :unsure:

I'm also referring to all your questions in the Node/JS forum. You seem to ask some pretty basic JS questions (even stuff like syntax) -- it's a much better idea for you to properly learn JavaScript in the first place, before taking on more advanced stuff.

website :: github :: twitter :: dribbble :: forrst
html, css, php, javascript, graphics
0


User is offline callumacrae 

  • {{ post.author }}
  • Group: Members
  • Posts: 2867
  • Joined: 20-January 11
  • LocationWarwickshire, England
  • Expertise:HTML,CSS,PHP,Javascript,Node.js,SQL

Posted 13 July 2012 - 01:16 PM (#50)

View Postitom07, on 13 July 2012 - 12:40 PM, said:

Not a bad read callum, could you post a node version. Instead of in php

http://phpjs.org/fun.../strip_tags:535
Front-end developer and writer
Twitter | GitHub | phpBB Contributor and Website Team Member | lynxphp
0


User is offline @Tom 

  • space
  • Group: Members
  • Posts: 707
  • Joined: 24-May 11
  • Locationspace
  • Expertise:Python

Posted 13 July 2012 - 02:26 PM (#51)

View PostCyril, on 13 July 2012 - 01:00 PM, said:

You should probably learn JS properly if you don't understand how to implement that :unsure:

I'm also referring to all your questions in the Node/JS forum. You seem to ask some pretty basic JS questions (even stuff like syntax) -- it's a much better idea for you to properly learn JavaScript in the first place, before taking on more advanced stuff.


I'm pretty sure you deserve like three -1's for that answer. Isn't this forum for learning? And I was referring to a script tag alternative.

I do not regret a single one of my questions because I've gone from understanding zero js to learning a pretty fair amount to then making my own node app. True a lot of my questions are quite basic but for what I'm using them for better to have a completely explained basic example and them adapt a more sophisticated version for my use.

On a third note there are times when I wish people would have asked questions because then I can learn from their answers. I'm sure there are new people to this forum who want to see easy questions as opposed to entirely years of experience type questions. Not everyone who joins has been coding for years.
ocelotapps.com
jr wdR comedian under ThatRailsGuy

View Postarronhunt, on 30 June 2012 - 10:09 PM, said:

Sir you are the first person to make me piss myself laughing. Kudos.
0


User is offline callumacrae 

  • {{ post.author }}
  • Group: Members
  • Posts: 2867
  • Joined: 20-January 11
  • LocationWarwickshire, England
  • Expertise:HTML,CSS,PHP,Javascript,Node.js,SQL

Posted 13 July 2012 - 02:30 PM (#52)

View Postitom07, on 13 July 2012 - 02:26 PM, said:

I'm pretty sure you deserve like three -1's for that answer. Isn't this forum for learning? And I was referring to a script tag alternative.

His point being that there were two lines of PHP-specific stuff, and it wasn't complicated PHP. This is a place for learning, but it certainly isn't a replacement for Google / MDN ;-)
Front-end developer and writer
Twitter | GitHub | phpBB Contributor and Website Team Member | lynxphp
1


User is offline @Tom 

  • space
  • Group: Members
  • Posts: 707
  • Joined: 24-May 11
  • Locationspace
  • Expertise:Python

Posted 13 July 2012 - 02:36 PM (#53)

View Postcallumacrae, on 13 July 2012 - 02:30 PM, said:

His point being that there were two lines of PHP-specific stuff, and it wasn't complicated PHP. This is a place for learning, but it certainly isn't a replacement for Google / MDN ;-)


Your correct and maybe I should have googled it but since I had the opportunity to directly ask the author, I took advantage of it.
ocelotapps.com
jr wdR comedian under ThatRailsGuy

View Postarronhunt, on 30 June 2012 - 10:09 PM, said:

Sir you are the first person to make me piss myself laughing. Kudos.
0


User is offline Kyek 

  • Founder of wdR
  • Group: Administrators
  • Posts: 5081
  • Joined: 20-February 10
  • LocationPhiladelphia, PA, USA
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL

Posted 13 July 2012 - 03:29 PM (#54)

It's no biggie :) I think what Cyril was getting at was that it's more important to understand the concept than it is to know how to get around it for one specific language. And he's right -- because XSS, while it sounds big and scary, is 100% resolved by doing two things, no matter what language you're working with:
  • Replace < and > with
    &lt;
    and
    &gt;

  • Never ever parse and execute user-submitted content.


So at that point, the question goes from "How can I block XSS in Javascript?" to "what's the best way to do string replacement?" and maybe "How can I rewrite this so I'm not eval()ing user-submitted data?" :) And those two questions are way easy to answer here.
1


User is offline @Tom 

  • space
  • Group: Members
  • Posts: 707
  • Joined: 24-May 11
  • Locationspace
  • Expertise:Python

Posted 13 July 2012 - 03:51 PM (#55)

I'm sorry Cyril that I snapped at you, you no longer deserve a -3 but a +1/2. Frankly the responses here are much clearer than on a lot of sites. (yes even yours :))
ocelotapps.com
jr wdR comedian under ThatRailsGuy

View Postarronhunt, on 30 June 2012 - 10:09 PM, said:

Sir you are the first person to make me piss myself laughing. Kudos.
1


Share this topic:


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users


Enter your sign in name and password


Sign in options
  Or sign in with these services