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

added short-name-length check #145

Merged
merged 1 commit into from
Apr 8, 2016
Merged

added short-name-length check #145

merged 1 commit into from
Apr 8, 2016

Conversation

samthor
Copy link
Contributor

@samthor samthor commented Apr 7, 2016

Starts to solve #69 with a basic assumption of 12 chars max, taken from the old Chrome extension manifest docs (which presumably evolved into the format we have today).

(Also partially just learning how to write an audit).

@samccone
Copy link
Contributor

samccone commented Apr 7, 2016

nice work here @samthor

@samccone samccone added +1 and removed +1 labels Apr 7, 2016
@samccone
Copy link
Contributor

samccone commented Apr 7, 2016

Would you mind adding this audit to one of the aggregators? :)

@paulirish
Copy link
Member

paulirish commented Apr 7, 2016 via email

@samthor
Copy link
Contributor Author

samthor commented Apr 7, 2016

Added. PTAL!

@samccone samccone added the +1 label Apr 7, 2016
@samccone
Copy link
Contributor

samccone commented Apr 7, 2016

champ 👏 ⚾ 🎉

const manifest = artifacts.manifest.value;

if (manifest && manifest.short_name) {
// Historically, Chrome recommended 12 chars as the maximum length to prevent truncation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe put in a mention of #69 to track while we figure out the answer there

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 lets link the issue as theres some valuable discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@samthor samthor force-pushed the short-name-length branch 2 times, most recently from 72900c4 to b0d756e Compare April 7, 2016 11:52
@samthor
Copy link
Contributor Author

samthor commented Apr 7, 2016

@paulirish Thanks for the explanation of the manifest vs parsed version. I get the approach now. PTAL

const manifestSrc = JSON.stringify({
short_name: 'i\'m much longer than the recommended size'
});
const manifest = manifestParser(manifestSrc);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also verify the Debug string is attached here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@paulirish
Copy link
Member

Lgtm % nit

@paulirish
Copy link
Member

Let's land this after deep's scheduler. (We'll have a conflict to fix)

@samthor
Copy link
Contributor Author

samthor commented Apr 7, 2016

Cool, I can keep rebasing as long as you like 👍

@paulirish
Copy link
Member

Ah! looks like no conflicts. :)

Not bad. Merging.

@paulirish paulirish merged commit f0c8225 into master Apr 8, 2016
@samthor samthor deleted the short-name-length branch April 8, 2016 01:34
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

Successfully merging this pull request may close these issues.

None yet

4 participants