News for hackers. Stuff that matters.
Re:Firefox takes a bite out of the canvas ‘super cookie’ by mschuster91 on Monday October 30, 2017 @07:12AM (#15584210)
I don't get why Battery Status API was dropped entirely instead being "castrated"... by default, allow clients to only detect <5%, <25%, <50%, <75%, <=100% (or simply <25% & >25%) so that e.g. Unity or other high performance apps can say "do you really want to play Unreal Tournament with low battery".

This could also be used by ads or stuff like background monero miners to prevent killing the user's battery...

Re:Firefox takes a bite out of the canvas ‘super cookie’ by hawski on Monday October 30, 2017 @07:46AM (#15584310)
I will cite myself from another thread -https://news.ycombinator.com/item?id=12862355#12863482

> There probably is not much of a difference for a website if user is low in power than if it is low in memory. There should be then just one flag/event really: low resources (catch-all for: battery, memory, CPU time, storage etc.). But browser could just emit please-save event and give a second or so to complete. Then decrease timer intervals significantly.

Re:Firefox takes a bite out of the canvas ‘super cookie’ by jstanley on Monday October 30, 2017 @03:19PM (#15588039)
If you decrease timer intervals, won't that increase the battery usage?

Or is the idea that you want to get as many timer calls in as possible before the device finally dies?

Re:Firefox takes a bite out of the canvas ‘super cookie’ by hawski on Monday October 30, 2017 @03:48PM (#15588280)
A stupid typo.

I meant increase intervals or decrease the number of them in a period of time.

Re:Firefox takes a bite out of the canvas ‘super cookie’ by jasonkostempski on Monday October 30, 2017 @08:12AM (#15584407)
Even if I have 100% battery, I don't want any of it going to ads or miners. For anything else, the OS already bugs the hell out of users when battery is low.
Re:Firefox takes a bite out of the canvas ‘super cookie’ by mschuster91 on Monday October 30, 2017 @07:22PM (#15589883)
For me it's rather a miner than ads. Ads are obnoxious, some of them actual malware - get me rid of all the porn, viagra and tracking ads and I'll happily run a miner for you.
Re:Firefox takes a bite out of the canvas ‘super cookie’ by mattmanser on Tuesday October 31, 2017 @04:47AM (#15591784)
Last site I was on with a miner I noticed as my laptop fan started going into vacuum mode. They'll just max out a core (all of them if they could).

It's definitely not cool with me, an insane waste of electricity.

Re:Firefox takes a bite out of the canvas ‘super cookie’ by mschuster91 on Tuesday October 31, 2017 @05:04AM (#15591825)
It does waste electricity, yes, and that's, to get back to the topic, something that a well-designed Power API could help keep in check.

Still, I prefer giving a "mining" contribution to a website operator (who actually needs some kind of revenue to live) over watching obnoxious ads and having my every move end up in dozens of tracker databases, in addition to hackers distributing malware over ad networks.

Re:Firefox takes a bite out of the canvas ‘super cookie’ by pdimitar on Tuesday October 31, 2017 @08:09PM (#15597872)
I prefer blocking them so bad they go out of business. If you can't pay to host your website then you don't have a viable business model and shouldn't be on the internet in the first place.

I am not indebted to anyone to allow them to use my machine's resources for their monetary goals.

If they want to make money off of me, make it clear -- I can respect that if I value your content. But exploiting browsers that are not caught up with latest security practices is being a scum and I will not tolerate it, ever.

Re:Firefox takes a bite out of the canvas ‘super cookie’ by raverbashing on Monday October 30, 2017 @07:18AM (#15584228)
You're counting at people accessing your battery level and using it for good intentions when that's the minority of web pages

Most will use it to try to push you harder "before your battery runs out"

Re:Firefox takes a bite out of the canvas ‘super cookie’ by harsh1618 on Monday October 30, 2017 @11:20AM (#15585609)
> Most will use it to try to push you harder "before your battery runs out"

An example of this would be an app like Uber charging you more if your battery level is low. They already know that people with low battery are willing to pay more: https://www.forbes.com/sites/amitchowdhry/2016/05/25/uber-lo...

Re:Firefox takes a bite out of the canvas ‘super cookie’ by matt_kantor on Monday October 30, 2017 @10:34PM (#15590735)
This reasoning could be extended (and maybe it should be) to remove APIs/headers allowing detection of OS/browser version (maybe Mac users are willing to pay more?), screen size (bigger monitor = more disposable income?), etc. For all of them there are tradeoffs, but it would be an interesting exercise to think about.
Re:Firefox takes a bite out of the canvas ‘super cookie’ by Drdrdrq on Tuesday October 31, 2017 @03:05AM (#15591529)
Thanks for an interesting link, appreciate it!
Re:Firefox takes a bite out of the canvas ‘super cookie’ by rqs on Monday October 30, 2017 @09:34AM (#15584857)
Or "before your battery runs out, please checkout our battery saving app"
Re:Firefox takes a bite out of the canvas ‘super cookie’ by faebi on Monday October 30, 2017 @10:55AM (#15585387)
Buy now or you will miss it, your will be soon out of battery! App starts to drain the battery till 5%
Re:Firefox takes a bite out of the canvas ‘super cookie’ by elaus on Monday October 30, 2017 @07:35AM (#15584268)
I really doubt advertisers will make their ads less resource-hungry (and therefore less noticeable/appealing) when they detect low battery levels just because it would be better for the user (albeit worse for themselves).
Re:Firefox takes a bite out of the canvas ‘super cookie’ by jerf on Monday October 30, 2017 @09:21AM (#15584783)
Actually, it's trivial to prove advertisers will ignore it: If the API actually became popular, ad blocker plugins would override it to always return the low battery status. Ad networks would respond to that by ignoring it. And now it's a zombie API.

The moral of the story is that Web API development is now driven at least partially by "How will advertisers abuse this new API?", and probably will be moreso over time, and that has, ahhh, interesting interactions with the forces pushing the browser into being the universal VM platform.

Re:Firefox takes a bite out of the canvas ‘super cookie’ by eli on Monday October 30, 2017 @09:38AM (#15584882)
I don't really follow this logic. Wouldn't ad blocker plugins block ads and therefore nothing about battery status is sent either way?
Re:Firefox takes a bite out of the canvas ‘super cookie’ by jerf on Monday October 30, 2017 @09:53AM (#15584970)
Defense in depth; you can't count on ads getting blocked so you also work to make the environment as hostile to them in other ways as well. If you've got something as easy as forging a single number, you take it for the ads that may still get through.
Re:Firefox takes a bite out of the canvas ‘super cookie’ by dspillett on Monday October 30, 2017 @08:27AM (#15584468)
The use case is for kiosk style applications to be able to give warnings to the user. Or for other apps to take extra precautions such as saving copies of dynamic state to non-volatile locations in case the power fails completely.

Though a battery percentage is not really useful for this as it could mean many things. My current main phone at 25% could last until tomorrow quite easily, my previous main device had at most a couple of hours left at that point. A simple "warning level" API would be more useful, allowing the app to register for events like "less than one hour of power left", "power loss likely in the next ten minutes", "entering super-power-saver mode" & "manual shut-down starting" and/or poll for the same flags. That way the device, which is much better placed to monitor such properties, can manage the warning levels perhaps with an off switch in case users don't want apps to know. Of course, you might have to enforce limited resource use in response to low power events, and you shouldn't allow much time between emitting "entering super power saver" events and actually entering the mode (which will shut off browser tasks until the mode is left).

So while there is a valid use case, that doesn't rely on trusting advertisers or other hogs to do something nice, the API as wasn't fit for that purpose and making something that is might be more complicated than you'd first think (so perhaps not worth the effort for the few apps that would actually make use of it).

Re:Firefox takes a bite out of the canvas ‘super cookie’ by disconnected on Monday October 30, 2017 @09:31AM (#15584844)
> Or for other apps to take extra precautions such as saving copies of dynamic state to non-volatile locations in case the power fails completely.

The system can crash, hang, forcefully reboot or otherwise die at any moment, without warning. All it takes is one "oopsy", for the phone to hit the ground and the battery to fly off.

If there is important data that needs to be preserved, applications should already be committing it to non-volatile locations periodically.

Re:Firefox takes a bite out of the canvas ‘super cookie’ by TazeTSchnitzel on Monday October 30, 2017 @07:28AM (#15584251)
Perhaps because there isn't a clear use for it other than fingerprinting? Battery percentages don't necessarily mean much. More useful would be a power-saving flag.
Re:Firefox takes a bite out of the canvas ‘super cookie’ by drzaiusapelord on Monday October 30, 2017 @10:29AM (#15585209)
Endless nags don't do end users much good. Battery status is a highly visible UI element on mobile. We don't need extra nagging from within an application. Also even less granular reporting is still an element to perform fingerprinting on.

App developers should be already working on these conditions by default. You should already have a game save system that can expect client shutdown or disconnection at any time.

That said, I could see a 15% or less warning but your mobile OS is doing that anyway, so why bother.

Re:Firefox takes a bite out of the canvas ‘super cookie’ by na85 on Monday October 30, 2017 @10:43AM (#15585283)
Better to just block ads and montero entirely.

Why risk it?

[dead]
Re:Firefox takes a bite out of the canvas ‘super cookie’ by wolco on Monday October 30, 2017 @03:52PM (#15588312)
Cars already refuse to start without sufficient fuel. It usually needs some.