Software

How one developer just broke Node, Babel and thousands of projects in 11 lines of JavaScript

Code pulled from NPM – which everyone was using


Updated Programmers were left staring at broken builds and failed installations on Tuesday after someone toppled the Jenga tower of JavaScript.

A couple of hours ago, Azer Koçulu unpublished more than 250 of his modules from NPM, which is a popular package manager used by JavaScript projects to install dependencies.

Koçulu yanked his source code because, we're told, one of the modules was called Kik and that apparently attracted the attention of lawyers representing the instant-messaging app of the same name.

According to Koçulu, Kik's briefs told him to rename the module, he refused, so the lawyers went to NPM's admins claiming brand infringement. When NPM took Kik away from the developer, he was furious and unpublished all of his NPM-managed modules. "This situation made me realize that NPM is someone’s private land where corporate is more powerful than the people, and I do open source because Power To The People," Koçulu blogged.

Unfortunately, one of those dependencies was left-pad. The code is below. It pads out the lefthand-side of strings with zeroes or spaces. And thousands of projects including Node and Babel relied on it.

With left-pad removed from NPM, these applications and widely used bits of open-source infrastructure were unable to obtain the dependency, and thus fell over during development and deployment. Thousands, worldwide. Left-pad was fetched 2,486,696 times in just the last month, according to NPM. It was that popular.

module.exports = leftpad;

function leftpad (str, len, ch) {
  str = String(str);

  var i = -1;

  if (!ch && ch !== 0) ch = ' ';

  len = len - str.length;

  while (++i < len) {
    str = ch + str;
  }

  return str;
}

You can witness some of the fallout here, here, here and here.

To fix the internet, Laurie Voss, CTO and cofounder of NPM, took the "unprecedented" step of restoring the unpublished left-pad 0.0.3 that apps required. Normally, when a particular version is unpublished, it's gone and cannot be restored. Now NPM has forcibly resurrected that particular version to keep everyone's stuff building and running as expected.

"Un-un-publishing is an unprecedented action that we're taking given the severity and widespread nature of breakage, and isn't done lightly," Voss explained about an hour ago.

"This action puts the wider interests of the community of NPM users at odds with the wishes of one author; we picked the needs of the many. This whole situation sucks. We will be carefully considering the issues raised by and publishing a post-mortem later.

"In the meantime, several thousand open source projects have been repaired, and I'm sleeping fine tonight."

A new maintainer, who stepped forward to look after left-pad on NPM, requested the restoration of version 0.0.3. Meanwhile, Oakland-based Koçulu has hosted his work on GitHub. If your code still won't build after the left-pad revival, try running npm cache clear to catch up with the changes.

And that's how JavaScript app development works in 2016. ®

Updated to add at 1138 PT (1838 UTC) on March 23

A spokesperson for Kik has been in touch to point us toward a blog post by Mike Roberts, the head of messenger at Kik, setting out its side of the story. It was published about 30 minutes ago.

Essentially, the instant-messaging biz says it was going to publish some open-source code including an NPM module also named Kik. That collided with Koçulu's Kik module, which is why the developer was asked to rename his software. As we know, Koçulu refused, and that led to Tuesday's cluster-fsck.

Referring to the emails sent by Kik's lawyer to Koçulu, Roberts said: "The wording we used here was not perfect. We’re sorry for creating any impression that this was anything more than a polite request to use the Kik package name on NPM for an open source project we have been working on that fits the name."

Send us news
170 Comments

Apple, Google yank opposition voting strategy app from Russian software stores

Oh, sorry, we thought you wanted us to obey the law?! – Silicon Valley

A tactical-voting app built by allies of Vladimir Putin’s jailed political opponent Alexei Navalny is now unavailable in Russian Apple and Google app stores following threats of fines from the Kremlin.

According to state-owned news agency TASS, Russian lawmaker Andrei Klimov told reporters on Thursday that the Russian Prosecutor General’s Office sent statutory notices to Google and Apple ordering a takedown of the Navalny app on the grounds it was collecting personal data of Russian citizens and sought to interfere in the nation's elections. Refusal to do so would result in penalties.

“The app particularly deliberately and illegally spreads election campaign materials in the interests of some candidates vying for positions in elective agencies or against the interests of such," Klimov said.

Continue reading

Google extends right-to-be-forgotten to app permissions on older Android devices

Software unused after a few months will lose access to sensitive features unless exempted

In December, Google plans to have app runtime permissions expire on older versions of Android for apps that haven't been opened for several months, extending the availability of a privacy protection feature introduced in Android 11.

"In Android 11, we introduced the permission auto-reset feature," explained Google software engineers Peter Visontay and Bessie Jiang in a blog post on Friday. "This feature helps protect user privacy by automatically resetting an app’s runtime permissions – which are permissions that display a prompt to the user when requested – if the app isn’t used for a few months."

That behavior is the default in Android 11 and in Android 12, expected in a few weeks. Come December, it will become the default in older versions of Android that rely on Google Play services, specifically Android 6 (API level 23) through Android 10 (API level 29).

Continue reading

Yes, of course there's now malware for Windows Subsystem for Linux

Once dismissed proof-of-concept attack on Microsoft OS through WSL detected in the wild

Linux binaries have been found trying to take over Windows systems in what appears to be the first publicly identified malware to utilize Microsoft's Windows Subsystem for Linux (WSL) to install unwelcome payloads.

On Thursday, Black Lotus Labs, the threat research group at networking biz Lumen Technologies, said it had spotted several malicious Python files compiled in the Linux binary format ELF (Executable and Linkable Format) for Debian Linux.

"These files acted as loaders running a payload that was either embedded within the sample or retrieved from a remote server and was then injected into a running process using Windows API calls," Black Lotus Labs said in a blog post.

Continue reading

Microsoft does and doesn't require VMs to meet hardware requirements for Windows 11

Either way, it's bad news for VirtualBox – it's stopped working

Microsoft emitted a fresh build of Windows 11 last night, and piled on the woe for some customers hoping that virtual machines might be their way out of the hardware compatibility hole.

Despite Microsoft's efforts to distract users by showing off its updates to the Photos app – now rolling out to users in the Windows Insider Dev Channel – the alarming warning that "this build includes a change that aligns the enforcement of the Windows 11 system requirements on Virtual Machines (VMs) to be the same as it is for physical PCs" was the main news for many testers.

Microsoft also said Hyper-V VMs of Windows 11 need to be Generation 2 VMs, and virtual machines running on virtualization and emulation products from other vendors, such as VMware and Oracle, "will continue to work as long as the hardware requirements are met."

Continue reading

Microsoft doles out Office Long Term Servicing Channel for cloud refuseniks

Redmond doesn't do things by half – unless it's Long Term Support

Microsoft has grudgingly admitted that not everyone will want to ascend to its cloud with the Long Term Servicing Channel (LTSC) version of its Office cash cow.

Earlier this year, the Windows behemoth announced that it was axing the length of support. No longer would customers enjoy decade-long delight. Instead, support would last for just five years, in line with Windows.

The release of this perpetual version is for commercial and government customers. The consumer version, Office 2021, will turn up on 5 October and likely be drowned out by users realising their PCs won't run Microsoft's latest version of Windows because OEMs want the gravy train to keep rolling of more stringent hardware requirements aimed at improving the user experience.

Continue reading

Sir Clive Sinclair: Personal computing pioneer missed out on being Britain's Steve Jobs

Lifelong cost focus was his namesake company's corporate downfall

Obituary Sir Clive Sinclair, the visionary pioneer of computing for the British masses and creator of the legendary ZX Spectrum, has died at the age of 81. His legacy is the British tech scene as we know it today.

Born in leafy Richmond, Surrey, at the height of the Battle of Britain in July 1940, he came to epitomise the early era of British computing through his company Sinclair Research Ltd and its iconic Spectrum product line.

Continue reading

Punchy Biden-lookalike grandad goes viral for fighting boxing gadget

'If you don't get your timing right you get whacked round the back of the head' admits scrappy octogenarian

An 80-year-old Lancashire grandfather has gone viral on TikTok and Instagram in a video featuring him squaring off with a sparring aid for boxers.

The video (see here) of Bob "Bruiser" Smith of Bamber Bridge near Preston ducking and diving around the Sparbar sparring device has received over 90 million views across the two social media sites.

The pugilistic pensioner – who was a fighter in his youth but banned from the ring by his father at the age of 14 out of concern for his safety – is treating his unexpected global fame with refreshing indifference.

Continue reading

Something phishy: Tech recruiters jabbed by fake COVID-19 Passport scam

Tells clients it is tackling the issue

An IT recruitment agency says a "phishing scam" is behind a fake email sent to its customers with details on how to apply for a "Coronavirus Digital Passport."

The email – sent to applicants and clients of Concept Resourcing, based in Dudley, England, on 14 September and seen by The Reg – claimed users could "Get your Digital Coronavirus Passports (HPS) today" and showed recipients a big juicy link where they could do so.

The link was not a genuine NHS website and appears to have been deleted shortly after.

Continue reading

How long till some drunkard puts a foot through one of BT's 'iconic, digital smart city communication hubs'?

Phonebox upgrade dishes out internet and more in Kensington and Chelsea

BT was joined by local dignitaries including the Mayor of Kensington to cut the silk sash on its 21st-century phone box that gives people access to free Gigabit Wi-Fi, rapid mobile phone charging, and free calls if needed.

The BT Street Hub 2.0 unit is now up and running in Notting Hill Gate with others due to be unveiled in the London borough of Kensington and Chelsea shortly.

The pods are also plastered with advertising, with BT trumpeting that it's giving small businesses the chance to snap up £7.5m of free street advertising space as part of its launch promo.

Continue reading

Snowflake doubters voice reservations over data warehouse's attempt to break into financial services

On-prem systems hold advantages in terms of known costs, say insiders

Cloud-based data warehouse darling Snowflake has launched its latest venture into financial services, while Teradata, something of a stalwart in data warehousing for banks and insurers, is attempting to broaden its appeal with machine learning implementations.

Though the world has been focused on Snowflake's stratospheric rise – it went from $1.5bn value in 2018 to $120bn shortly after its IPO last year – it may struggle to make inroads into the lucrative financial services markets, according to insiders and industry experts.

The so-called cloud-native data warehouse biz launched what it calls the Financial Services Data Cloud this week, accompanied by the claim that 57 per cent of Fortune 500 firms in the sector are on its platform. It is described as an industry-tailored platform that brings together Snowflake technology with "partner-delivered solutions" and "industry-critical datasets."

Continue reading

Consultants' eyes light up as UK.gov dangles £4bn over 6 years for 'large-scale digital transformation programmes'

Phrase is catnip for software market

UK government has tempted the ravenous software and consultancy supply market with £4bn in the name of "large-scale digital transformation programmes."

At a time when the government has been forced to increase National Insurance tax to fund much-needed social care, the Cabinet Office's Crown Commercial Services has deemed it the opportune moment to start a multibillion-pound conversation with suppliers via a "prior information notice" for Digital Specialists and Programmes.

Following the logic previewed in the tender's title, the procurement is set to be split into two lots: one for "Digital Programmes" and another for "Digital Specialists."

Continue reading