news4geeks.net
19Aug/110

T-Mobile Javascript comment stripper breaks websites

glassy programmerAttempts by T-Mobile to speed up mobile data connections are breaking websites.

The bug intermittently affects mobile device users and PC users using tethered connections. It is caused by "optimisations" to the sites' Javascript code made on the fly, in attempt to optimise the amount of data received. Instead of stripping out comments, the optimisation – or more precisely, "pessimisation" – also strips out strings in the code itself.

MySociety first publicised the issue last week.

A developer told us the bug struck while his team was giving a demo to a potential investor. The team subsequently spent two days tracking down what had caused the issue.

"T-Mobile have managed to strip out bits of JavaScript code as well as comments. The jQuery library suffers, too. Worse than that, the script files are cached and won't get replaced when the user moves off 3G and back on to a decent ISP: in effect, T-Mobile has broken websites permanently," said the dev.


MySociety's Matthew Somerville blamed clumsy coding:

"The T-Mobile JavaScript comment-stripper appears to be searching for '/*' and '*/' and removing everything in between. This might work in most cases; however in the jQuery library, we find a string containing '*/*', and later down the file, another string containing '*/*'. T-Mobile removes everything between the things it thinks are comment markers, even though they're actually contained within strings, causing the jQuery library to be invalid JavaScript and stopping anything using jQuery from running," he wrote.

The apparent indeterministic nature of the bug – which attacks only occasionally – has made it harder to track down. "We are investigating the issue you have raised and are taking it very seriously," T-Mobile told us.

(Source: theregister.co.uk

A cottage industry is growing up around virtual padlocks that consumers can place on cloud services so that the vendors themselves can't get to the information -- even ...
READ MORE
Hacking group Anonymous asked websites to black out their front pages on Monday, in protest against legislation in the U.S. that would allow online companies and government agencies ...
READ MORE
Facebook: We’ll show you our PUE, now you show us yours
The data center industry has come a long way from the days when organizations closely guarded their efficiency secrets. Facebook is now the poster child for green-data center ...
READ MORE
Open your data to the world
When Neil Fantom, a manager at the World Bank, sat down with the organization's technology team in 2010 to talk about opening up the bank's data to the ...
READ MORE
Firefox-maker Mozilla could issue a "death sentence" to TeliaSonera's SSL business over allegations the telecoms giant sold Orwellian surveillance tech to dictators. The punishment would be an embarrassing blow ...
READ MORE
How to keep the feds from snooping on
Anonymous calls for Internet blackout to protest CISPA
Facebook: We’ll show you our PUE, now you
Open your data to the world
Firefox ‘death sentence’ threat to TeliaSonera over gov

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.