News for hackers. Stuff that matters.
Re:Interactive Javascript Terminal as a personal website by ameketa on Thursday November 04, 2010 @06:21PM (#1871062)
Re:Interactive Javascript Terminal as a personal website by llimllib on Thursday November 04, 2010 @07:10PM (#1871230)
That's a remarkably terrible way to implement a terminal.
Re:Interactive Javascript Terminal as a personal website by eneko on Friday November 05, 2010 @12:35AM (#1872037)
It was never my intent to implement a terminal. The site does not execute any system commands at all on the server side. Pretty much, all commands are 'custom' or invented, to show stuff about me and stuff I've worked on (a long, long time ago). Nothing else.
Re:Interactive Javascript Terminal as a personal website by rwolf on Thursday November 04, 2010 @06:47PM (#1871137)
glad to see HN is enjoying yesterday's release of mod_pagespeed: http://enekoalonso.com/terminal.php?command=ls&path=../....
Re:Interactive Javascript Terminal as a personal website by andfarm on Thursday November 04, 2010 @07:24PM (#1871291)
We (DreamHost) don't have mod_pagespeed support out quite yet, but the feature should be available to our customers by the end of the day today, as soon as I flip the switch to turn it on. :)
Re:Interactive Javascript Terminal as a personal website by eneko on Friday November 05, 2010 @12:32AM (#1872027)
Nice. The code was already checking for '..' on the path, but the condition was erroneous. Fixed now.
Re:Interactive Javascript Terminal as a personal website by toolate on Friday November 05, 2010 @03:01AM (#1872313)
You might be better off getting the canonical path and then checking against a whitelist. E.g. `strpos(realpath($command_path), '/var/www/html/') === 0`.