Ahhh.. again with the fucking retaliation upvoting!!
@TerryChia I know you think it is, but that's not what it means in the context of the OP's question.
@TerryChia Just because parametrized queries means that the input of the user isn't part of the query, doesn't mean that separation of code from data = parametrized queries.
@TerryChia First of all, this is about XSS. Separating code from data means that you don't shove layout and user input in your main logic. Making it easier for you to have a central code for encoding and escaping user input.
Think, MVC.
@Terry One example for this "technique" of centralizing security-related stuff is by making a single point for authenticating users. Making it less likely to fuck up the authentication process in certain pages.
Implementing that in PHP would be by using something like include auth.php
and it's not just what I think it means. That is what it means.
Just because the fridge is an electrical appliance, doesn't mean that whenever you hear the term 'electrical appliance' then it's referring to a fridge.
@Svetlana I completely disagree with your interpretation. Read the quote, it has nothing to do with code design which I agree is a very good idea in any case.
@TerryChia Jesus Christ! Dude, I'm not saying parametrized queries aren't part of a separation strategy. They just have nothing to do with this question.
You and I both know the issue at hand is an XSS one. Maybe the OP doesn't when he grabbed that quote from somewhere. Given the very unclear state of his question, I gave him a more general advice on what to do. I linked to both XSS and SQL injection cheat sheets from OWASP.
I think it's unfair that you downvoted when there isn't anything wrong with the answer.
Look, the other answer also mentioned parameterized queries. That's how I interpreted the quote.
@TerryChia Yes, I agree. It would be unfair to downvote you when there's nothing wrong with your answer. But there is, it doesn't address the question.
@TerryChia Oh wait wait (check the message I'm to which I'm replying), you see.. stored procedures. They're different from parametrized queries. Actually, stored procedures are part of the separation strategy I talked about.
Also, just read one line above and see the title of the section
> Phase: Architecture and Design
and then you say:
> Read the quote, it has nothing to do with code design which I agree is a very good idea in any case.
@Terry Anyway, I don't want to upset you. Downvote taken back.
However, I still think you haven't addressed the question.
@Svetlana I know they are different. But they are used (in most cases) to accomplish the same thing which is preventing SQL injection attacks. I'm also reading that Architecture and Design phase as "Choose a framework that helps you with this type of stuff; choose parameterized queries/stored procedures over dynamic SQL." I don't think it's about how you structure your code ala MVC and the like.
I also don't know how to provide a better answer given the generally crappy state of that question...
Why does google has so many IP addresses and how the dns-server knows which of them to use when I ask for www.google.com in the browser ?
nslookup google.com
Non-authoritative answer:
Name: google.com
Address: 212.179.180.113
Name: google.com
Address: 212.179.180.95
Name: google.com
Addre...
@Svetlana It's really cool to see the planes circling, they are supposed to do a paradrop as well, but it's getting quite dark atm. Hope they can do it still
@Svetlana because it's a giant circus, our army has material but no funds to train with them, the last time we sent in active combatants was 10 years ago and only recently we started actually using our almost 40 year old F16 in combat
@Svetlana and all the corruption scandals we had in the past 20 years
|commander2=Hassan Nasrallah
Imad Mughniyeh
Nabih Berri
Ali Qanso
Khaled Hadadi
Ahmed Jibril
|strength2=
Several hundreds (south of the Litani river)
|casualties2=Hezbollah militia:
250 (Hezbollah claim)
≤500 (Lebanese officials' est.)
500 (UN officials' est.)
600-800 (IDF claim)
Wounded:
1,500 (Lebanese officials' est.)
Captured: 4 fighters
Amal militia: 17 dead
LCP militia: 12 dead
PFLP-GC militia: 2 dead
----
IRGC: ~6–9 dead (Lebanese officials' est.)
Lebanese Army and Police Forces: 43 dead
|casualties3=
Lebanese citizens (combatants included) and foreign civilians:
Dead:*
1,191 (...
bcrypt is actually the name of the home of magical dwarfs who takes in arbitrary inputs and spits out jumbled nonsense we humans call a hash. — Terry Chia39 secs ago
@AviD I wish we were a bit more like Israel ==> "Ow you fucked us over, no worries let me send in a striketeam and let you magically appear in Israel where you can stand trial."
air+artillery was attempted in lebanon before (winter of 95-96). the problem is Hizballa is not a standard army, with tank columns, infantry lines, etc.
you cant airbomb a squad of 3 wandering the hilltops...
Even if intelligence could find the missiles, they are often hidden in a "safe" place, safe being in a place where Israel would not bomb, until they are ready to shoot.
@Svetlana mobility alone is not that big a deal. We've hit moving targets, even with artillery 30 KM away.
its the "not being able to shoot at them before they fire" part.
Wikipedia trivia: if you take any article, click on the first link in
the article text not in parenthesis or italics, and then repeat, you
will eventually end up at "Philosophy". - Randall Munroe, XKCD (mouse-over text)
I have tried this for several different articles and was surprised t...
The topmost dangerous mistake in C programming is using C. This is an unpopular assertion, but decades of experience back me up.
C is a nice programming language in that it allows you to express operations in an "abstract machine" (that's how the C standard puts it) which will get translated eff...
I can't believe The Bear mentioned python and C# in the same sentence as node.js. :(
@Iszi: Get-ChildItem will return zero, one or several objects. When you get several, they are automatically wrapped into an array (Object[]). If you get one, then you have the object itself (e.g. a System.IO.FileInfo, not an array of one object). If you get zero, then value is $null, not an array of zero object.
@Iszi: you can normalize things by doing: "if ($val -eq $null) { $val = New-Object Object[] 0 } elseif (!($val -is [Array]) { $val = @($val) }"
There is probably a better way, but at least this will work (well, once formatted, tested, and the typos removed, because I have done none of this).
@LucasKauffman Node.js, like many other languages, offers simple management of character strings (with automatic memory management), checks on all array accesses, and strong types, which avoids the common pitfalls of C programming. In the context of the question, it is thus "good".
@HamZa But that's a good thing. Those people will grow into the developers who will create applications with vulnerabilities, which we will be paid to fix.
Yeah well let's hope you just have to point out the vulnerabilities instead of diving in horrible code and fix it yourself. Fix in this case means: rewrite almost everything