Skip navigation.

miscoded

the web is a hack

deviant mousedown

, , ,

Understanding other people's workarounds can be simply impossible. Take this example from the popular creative forum deviantART: if a member tries submitting a new entry from Opera, it will appear impossible to upload files because the "Choose" button does nothing when clicked. (Tabbing to it and pressing enter will work, but who'd think of that..)

The reason is buried deep inside this JS file:
if (window.browser && (browser.isGecko || browser.isOpera)) {
     uploadForm.onmousedown = function () { return false; }; // firefox only - screws up other browsers
}

So this "Firefox only" workaround against an unspecified problem I can't begin to understand is also applied to Opera - with the fatal result that we ignore any mouse clicks inside the upload form because the script cancels mousedown. I'm not sure who's deviating from what here..

(As an aside, code like this makes me pretty curious - what will show up in the site if I throw in a small user JS to set deviantART.pageData.i_am_super_privileged to true?
// most awesome hack ever
if (!path[1] && whoosh[0] == 'Fan Art' && deviantART.pageData && deviantART.pageData.i_am_super_privileged)
source)

A malicious thought: how to imagine a security issue

So Dan Kaminsky claims on Wired that the browser is the bug after investigating Flash security policy issues. Well, we already know that the Flash security policy is too liberal by default, and it's not exactly a bug in the browser from my point of view -

But the Wired article is interesting, though not very detailed. Some scope for imagination.. so let's imagine he has found a way the page will "spoof" its own address to confuse the plugin when it tries to apply samedomain policies.

Just imagine, how might that happen?

One of the unbelievable shortcomings of the old Netscape plugin API is that it doesn't actually tell the plugin the address of the page you're loading. That makes it kind of hard for a plugin like Flash to apply any meaningful samedomain security policy!

What Flash does to work around this is to ask the browser to open this URL:

javascript:window.location+"__flashplugin_unique__"

and read the output. In other words, to spoof the address of the page you're at would require making the browser see another object than the real window.location in this request. (Also, it means Flash can't apply security policies when JavaScript is disabled.. And I wonder if IDNA allows underscores in URLs now and what would happen if Flash ran on, say, www.example.com__flashplugin_unique__.com? Will Flash see their "unique" string and consider it the end of the URL?)

Of course we can not set "location" because trying to set it will take you away from the page and destroy the plugin instance you're trying to confuse.

Is there any other way to hide the location object?

The malicious thought: elements with IDs populate the global object (aka window). What would happen if we added an element with the id "location" to the document? Something like..

<div id="location" href="http://www.example.com/"></div>

just might make the browser see something completely different if you read window.location.href ...

Here is a
test case.
Luckily for your online safety Opera, Firefox, IE7 and Safari on Windows all pass - so move on, nothing to see here. But it's a good test case to keep around - for next time we tweak how elements are exposed in the global scope - and perhaps it inspires more of you to look for those places where feature + feature = security issue..

For security testing, every malicious thought is welcome!

:devil:+:sherlock:=:wizard:

they've made you safer

One night I checked work E-mail quickly on my mobile, and one of the numerous E-mails from the bug tracker caught my attention. It had a very specific and detailed - though brief - summary and claimed the bug was about a samedomain security policy violation. With mixed feelings of security concerns and curiosity I didn't go to bed but un-packed the laptop to have a look at the bug...

Now 9.24 arrived a couple of days ago. This is a recommended security upgrade which fixes two security issues, reported by Opera users. Both of them hang out on My Opera, so cheers to dbloom and burnout426 for having made us all safer! The results of their work and testing reach beyond those two simple fixes since a single security issue found makes us all investigate how it happened - QA wonders why things weren't tested from that angle - and thus a number of new test cases are written to try to ensure not only that those issues won't re-occur but also that related similar issues won't arise, and will be caught when they do.

So many thanks, guys! Good catch and your work is greatly appreciated. :cool:

Y!Mail: getting somewhere

,

Short status update: They've been busy at Yahoo moving accounts from Yahoo Mail Beta to Yahoo Mail 1.0 - all but one of my usual test accounts have suddenly lost the "Beta" text from the icons. Today's weekly build isn't bad either, after a couple of weeks where Y!Mail seemed to hit every crash bug in the internal builds, it's finally stabilised and runs pretty smoothly.

On Monday (or possibly even earlier) a new browser.js will go public for 9.5, and it should resolve most of the issues that currently prevent Y!Mail from loading in the new weekly build. Sorry to keep you waiting but I was working later than my server admin colleague tonight..

This time, to get Y!Mail working I had to remove several patches. Since our shiny, improved getters and setters support enables the Y!Mail compatibility layers to do their job, patching should hardly be required anymore...

Actually, the current version of browser.js messes it all up and gets in the way - several of the errors you see if you try to load Y!Mail right now is from browser.js code where the old patches are incompatible with the new getters and setters stuff!

This is great news. Removing patches is good. And I've never seen Y!Mail work better with Opera than Y!Mail 1.0 and 9.5 9594 with the new browser.js - even chat works nicely! You Yahoo mail users should have something to look forward to :smile:

Wiidgets!

,

Wow, Wii now has widgets! That's exciting news. I admit to being sceptical when Opera first spent time implementing widgets on desktop, but the amazing creativity over at widgets.opera.com has convinced me many times over that it was a great idea. Are we really shouting loudly enough how exciting it is to see widgets on the Wii? :smile:

FataL says digg it and so do I.

dog food

,

Eating your own dog food is a great way to test software.

Except that the worst thing about "dogfooding" is the crap bug reports one files when there is no time to analyse because one is trying to get something else done.

This summer we were trying to book a DFDS Seaways trip. My wife complained about a server error near the end of the very long-winded booking process. Test. Reproduce. Re-test in another version. Reproduce. Re-test with HTTP traffic logging to try to investigate quickly. Give up. File half-baked bug report. Switch to IE for booking - I'VE SPENT HOURS JUST GET ME A TICKET - and see exactly the same 500 error at the same stage of booking, from a website that was obviously well and truly broken. What a vasted bug report..

Or the excuses:

"Yes, I will look up that bus schedule for you but I noticed that the menu on the bus company's web site didn't work". "Sorry that it took me so long to order the CD, I just had to check out a very strange JavaScript error message". "I'll stop using this computer right now, I just need to E-mail that travel agency about their outdated JS library".

So guys, I think each and every one of you is remarkable for actually eating our dog food by following the desktop team's blog, each weekly build being downloaded thousands of times and inspiring hundreds of comments and bug reports. Such fabulous and awesome supporters and dogfood eaters. :smile:

captured in India

, , ,

Google Indic Transliteration does quite precisely nothing in Opera. The reason is that they try adding a capturing key event listener to a TEXTAREA:

a.addEventListener(b,c,true)

from function _TR_addHandler in labs001.js.

If you've followed the past twists of the event capture drama, you might recall that since Mozilla decided to play chicken and re-write the spec according to their buggy implementation, we decided to be bug compatible. So why is the transliteration still broken? Seems like we aren't quite compatible after all?
Yup. Test case here.
Capturing key event listeners still don't fire on target. That's a bug in our bug compatibility, leaving us more standards compliant than intended.

So our bugs are buggy :whistle: . How do you spell "irony" in Hindi again?

function(p,a,c,k,e,r) de-mystify trick

,

If you ever came across code that starts
eval(function(p,a,c,k,e,r)

here's a small demonstration of how to turn that code into something sensible..

A word of warning: I'm experimenting with Wink for creating Flash screencast-type demonstrations. That means you agree to receive a 1.5 M .swf file of screenshots and text by clicking through to the post.

I haven't quite mastered Wink, some unintentional mouse movement might occur but anything in the spirit of experimentation.. Feel free to tell me in comments whether you like more of those Flash-based visual demonstrations or prefer the old-fashioned screenshot approach.

Read more...