Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscribe should not return an integer #76

Closed
djensen47 opened this issue Jan 6, 2016 · 3 comments
Closed

Subscribe should not return an integer #76

djensen47 opened this issue Jan 6, 2016 · 3 comments

Comments

@djensen47
Copy link
Contributor

Returning an int allows for unsubscribe forgeries. Let's say my app has an ad network and a malicious ad gets onto the network, that ad could potentially brute force unsubscribe.

A better solution would be to return an object. Even better would be for that object to have the unsubscribe call itself.

@tripzero
Copy link
Contributor

tripzero commented Jan 6, 2016

Returning an object that had the unsubscribe method on it sounds reasonable.

Of course, you could also reduce the possibility of a malicious unsubscribe
by returning a significantly large random integer. You could use web
crypto to generate the random number to take advantage of hardware
randomization.

On Wed, Jan 6, 2016, 2:30 PM Dave Jensen notifications@github.com wrote:

Returning an int allows for unsubscribe forgeries. Let's say my app has an
ad network and a malicious ad gets onto the network, that ad could
potentially brute force unsubscribe.

A better solution would be to return an object. Even better would be for
that object to have the unsubscribe call itself.


Reply to this email directly or view it on GitHub
#76.

@tobie
Copy link
Member

tobie commented Feb 4, 2016

The security argument is moot the minute you're allowing third party code to execute within the same origin.

@tguild
Copy link
Member

tguild commented Mar 14, 2017

Old issue for WebIDL

@tguild tguild closed this as completed Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants