Better HN
topnewbestaskshowjobs
Log inSign up

anglebracket

150 karma · joined Jan 13, 2013 (13y ago) · 50 submissions

Security Person.
Submissions

comment 12y ago · link · parent

It doesn't take input from the user, but it does use untrusted input in a way that allows XSS. See https://news.ycombinator.com/item?id=7128442 .

comment 12y ago · link · parent

> WRONG. Because you have to use mysql_REAL_escape_string.

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

> Works in Chrome.

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

ECMAScript doesn't flow as well as JavaScript though.

How do you pronounce it, anyways? E-C-M-AScript? Ec-maScript? EczemaScript?

comment 12y ago · link · parent

I haven't messed with my xmonad.hs in a long time, but adding

  setWMName "LG3D"
to my startupHook fixed most of the issues for me.

comment 12y ago · link · parent

Yeah, that's a design issue in RequestPolicy that I'd like to see fixed. I never use the full domain option because it's such a pain to use on sites with many subdomains.

comment 12y ago · link · parent

> https://addons.mozilla.org/en-US/firefox/addon/requestpolicy...

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

Credit card readers may use PS/2 connectors[1]. There are POS keyboards with integrated card readers that use PS/2 connectors, as well [2].

[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

>XML Data Islands come to mind as something that has legitimately anchored companies I've worked with to IE6

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

>Sounds like a bunch of victim blaming

Ironic that you should say that, considering that Weev's defense is essentially "her parameters were all hanging out and it was just so easy."

comment 13y ago · link · parent

How does this handle the majority of users who use webmail clients?

comment 13y ago · link · parent

>Is it really so insulting that she didn't say "girls and boys"

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

The click handler is registered on the canvas and it checks e.offsetX. On Firefox, some people use e.layerX, but it's not exactly the same thing [0]. Someone posted a useful polyfill on JQuery's bugtracker [1].

Firefox should just support offsetX as well, but they don't, for whatever reason.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=122665#c3

[1] http://bugs.jquery.com/ticket/8523#comment:16

comment 13y ago · link · parent

John Lindquist's videos are a godsend when it comes to learning Angular. His videos finally convinced me to switch to doing all of my web development in IDEA (since I had a license anyways) with the AngularJS plugin.

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

Sorry, I should have read the parent post more carefully. However, I still think that's it's valid to compare Chrome and HN strictly on "freeness" regardless of whether or not they're the same kind of product.

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

I don't see what reach has to do with making HN "free" and Chrome "not free" if they both use space in their interfaces to deliver advertisements. Arguably, Chrome would be more "free" since HN displays its advertisements more prominently than Chrome's and they masquerade as user-generated content. Is there more to your metric?

comment 13y ago · link · parent

If minification and obfuscation were the only things being done, then your analogy would be sound, but tricks like this also have the effect of degrading the experience for legitimate users with javascript disabled.

Adding a dependency on javascript for static content doesn't seem like a good idea to me.

comment 13y ago · link · parent

Especially since the actual visit was in 2011.

comment 13y ago · link · parent

I can't say for sure, there's not a whole lot of info about the circumstances.

Reading into the last couple of paragraphs, it sounds like may have comitted suicide, but that's just speculation.

comment 13y ago · link · parent

He did return the data, in a sense. He gave JSTOR the hard drives containing the articles he copied and assured them that it was the only copy.

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.

12