150 karma · joined Jan 13, 2013 (13y ago) · 50 submissions
comment 12y ago · link · parent
comment 12y ago · link · parent
Using mysql_real_escape_string is almost a sign you're doing something wrong. You should be using prepared statements with PDO or mysqli.
> The point is that I can't audit (and would rather not waste my time doing so) this PHP code.
I wasn't going to bother, but this post is pretty high up on the front page. There's some XSS issues with the JSON output, the Content-Type header isn't set to 'application/json' so PHP decides to set it to 'text/html'. Now anyone that controls ipecho.net[0] or can execute commands as any user on the server[1] can XSS users of the panel.
If you'd like to confirm, go to /sh/ps.php and notice where the page breaks due to strings in the JSON being interpreted as HTML.
[0] https://github.com/afaqurk/linux-dash/blob/master/sh/ip.php#...
[1] https://github.com/afaqurk/linux-dash/blob/master/sh/ps.php#...
comment 12y ago · link · parent
Hmm, looks like Chrome isn't respecting the Public suffix list for setting cookies ATM, even though the site for the list claims that it does.[0]
For an example, view [1] and [2] in Chrome, and note that cookies set by [1] are viewable by [2] even though this shouldn't be allowed given blogspot's entry in the public suffix list. Firefox doesn't exhibit this behaviour, and I'm thinking this is a recent regression in Chrome, but who knows.
> Also look at translate.googleusercontent.com, if you bomb it, Google Translate will stop working.
I haven't taken a look at it, but would it make sense to add dynamic <original>.translate.googleusercontent.com subdomains for translated sites and add the base domain to the public suffix list?
> it should be solved by browsers too & length should be limited
IMO this is only going to be solved by a revision to the spec that resolves the ambiguity. The core issue is that browsers and servers disagree as to what a "reasonable" cookie jar size is, and servers are rejecting request with "unreasonably" large cookie jars.
Until those limits are actually part of a spec that people follow, someone's going to be sending too much or allowing too little and legitimate requests will get rejected.
I don't know if you've read Michal's "The Tangled Web" or the Browser Security Handbook but they both go into it a little.[3]
[0]: http://publicsuffix.org/learn/ (under Chromium)
[1]: http://cookietestblog1.blogspot.com/2014/01/cookie-test.html
[2]: http://cookietestblog2.blogspot.com/2014/01/cookie-test.html
[3]: http://code.google.com/p/browsersec/wiki/Part2#Same-origin_p... (under cookie jar size)
comment 12y ago · link · parent
I like and use RequestPolicy on a daily baiss, but unfortunately the version on AMO hasn't been updated for some time now. There are a number of long-standing issues (like clicking links in the view source view,) including one that allows bypassing the whitelist entirely [0].
>this one has better granularity (you can specify the type of content [...]
Mmm, RequestPolicy's meant to allow or deny cross-domain communications full stop. It doesn't care too much about what happens once it's allowed.
The granularity offered in HTTP switchboard is better suited to dealing with cross-domain "annoyances" than RequestPolicy.
>[...]for each (sub)domain).
Not quite the same, but RequestPolicy allows you to use the effective TLD, full domain, or scheme + full domain + port for your rules (it's under preferences.) By default it uses the effective TLD.
[0] http://blog.saynotolinux.com/2013/11/bypassing-requestpolicy...
comment 13y ago · link · parent
[1] http://support.quickbooks.intuit.com/opencms/sites/default/I...
[2] http://www.ebay.com/itm/CHERRY-MY8000-BEIGE-PS-2-KEYBOARD-CR...
comment 13y ago · link · parent
Looking at the pages describing XML data islands, it looks like it would be a day's work to make a shim for other browsers using jQuery.
What other "features" would you miss out on by not using IE6?
comment 13y ago · link · parent
Agree. There's nothing in the article that even suggests that this phenomenon only applies to, or more often applies to women.
The "to all the girls" part is clearly due to the fact that the article is written by a woman and posted on a site mostly directed towards women.
EDIT: It looks like the article's been edited since it was originally posted, and that it used the wording "this experience applies to women (...)." I still don't think this is a major issue since the article was meant to assuage the concerns of someone who's experiencing impostor syndrome, and again, the article is written by a woman and posted on a site mostly directed towards women.
comment 13y ago · link · parent
Firefox should just support offsetX as well, but they don't, for whatever reason.
comment 13y ago · link · parent
I found out about his videos through the other ones he put on JetBrains TV[0]. If you're looking for an absolute crash course in AngularJS, the ones on JetBrains TV are the best.
[0] http://tv.jetbrains.net/channel/webstorm/angularjs , http://tv.jetbrains.net/videocontent/angularjs-custom-compon...
comment 13y ago · link · parent
We're talking about advertisements and the advertisement's only one one page. The scope of the actual advertisement is roughly the same as it is on HN. The fact that an advertisement in the default tab of a browser is likely to have more viewers is irrelevant.
comment 13y ago · link · parent
comment 13y ago · link · parent
Adding a dependency on javascript for static content doesn't seem like a good idea to me.
comment 13y ago · link · parent
Source: https://www.nytimes.com/2011/07/20/us/20compute.html?_r=0
You're right in that return is probably the wrong word though, because it implies that they were "gone" in the first place.