r/programming • • Nov 25 '15

Don't use the OWASP PHPSec Crypto Library

https://gist.github.com/paragonie-scott/91893fdb18ee4d1a1b95
34 Upvotes

80 comments sorted by

View all comments

Show parent comment

-1

u/NeuroXc Nov 26 '15 edited Nov 26 '15

The tutorials online are crap

Stupid people have written things online trying to teach people how to use a thing? Must mean the thing itself is terrible.

the language is often hostile to them

This can be said about a lot of languages.

they end up writing a whole bunch of vulnerable code (because web security is complex) without realizing it

This can be said about any language. Most concepts in web security are not specific to one programming language. SQL injection, XSS, authentication, password hashing, encryption, etc., are things that exist in and are easy to mess up in any programming language if you don't understand what you're doing. The reason it looks like people mess these up more frequently in PHP is because PHP is used more than other languages for web development, especially by beginners, because it's dead easy to install LAMP (or MAMP or WAMP) and be able to play in PHP in very little time. Ruby and Python take significantly more setup to be accessible through a web server. They are not friendly to beginners for web development.

Has PHP made bad design choices in the past? Yes. Has it made better design choices in the past 5 years than it did when it was first created? Also yes. Has the web development community decided that it's time to stop being childish and hating on PHP at every opportunity? Apparently not.

5

u/technicolorNoise Nov 26 '15

Installing a Node/Mongo stack isn't much harder than setting up LAMP now. Not that the database is a particularly good choice, but at least the language is a lot saner.

What do you think the point of trying to improve PHP is? Even if a whole lot of people put a whole lot of effort into redesigning PHP's APIs and making its implementation better, what exactly does a general programmer get out of that? Nothing that he couldn't obtain more easily by picking a different tech stack.

So there's two reasons people hate on PHP:

  1. It's easy and fun to mock PHP.
  2. To push the community farther along the path to "deprecation" of PHP, so people don't use it anymore.

0

u/[deleted] Nov 26 '15

[deleted] — view deleted comment

3

u/[deleted] Nov 26 '15

And PHP frameworks are pretty much immune to all that by default, too. You can't really compare a framework to language.

2

u/jsmith0295 Dec 04 '15

C# Does Have Consistency. at Least In C#, Too Many Things are Consistently Capitalized.

But seriously, nobody ought to be developing PHP the way it was done in 2003 anymore. Laravel is secure by default as well.

How to: in terminal type "laravel new {appname}"

Installation is basically just as straightforward as Visual Studio, too.

0

u/[deleted] Dec 04 '15

Just a follow up: http://www.theregister.co.uk/2015/12/04/veracode_programming_languages/

"80 percent of apps written in PHP, ASP, or ColdFusion flunked kindergarten security tests sporting one of the Open Web Application Security Project's Top Ten quality coding benchmarks."

80 percent. Woah.