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

PERF: styler uuid control and security #36345

Merged
merged 9 commits into from
Sep 19, 2020

Conversation

attack68
Copy link
Contributor

@attack68 attack68 commented Sep 13, 2020

  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Styler uuid is randomly generated from 16bytes, or 128bit entropy, which is poorly formatted for data transmission over the web.
Styler uuid1 is super-ceded by uuid4 which is more network secure.

This PR addresses the two above items by switching uuid method, and then coding the default entropy to 5 characters (20bit) which should be more than sufficient to avoid HTML table collision on a webpage, but make substantial data transfer savings for large tables.

uuid length remains configurable.

@attack68 attack68 changed the title styler uuid control and security PERF: styler uuid control and security Sep 13, 2020
pandas/io/formats/style.py Outdated Show resolved Hide resolved
pandas/io/formats/style.py Show resolved Hide resolved
pandas/io/formats/style.py Outdated Show resolved Hide resolved
pandas/io/formats/style.py Outdated Show resolved Hide resolved
@jreback jreback added the Styler conditional formatting using DataFrame.style label Sep 13, 2020
pandas/io/formats/style.py Outdated Show resolved Hide resolved
@jreback jreback added this to the 1.2 milestone Sep 19, 2020
@jreback
Copy link
Contributor

jreback commented Sep 19, 2020

lgtm. @WillAyd if you have any remaining comments.

@WillAyd WillAyd merged commit ff11c05 into pandas-dev:master Sep 19, 2020
@WillAyd
Copy link
Member

WillAyd commented Sep 19, 2020

Thanks @attack68

@attack68 attack68 deleted the enh_styler_uuid branch September 19, 2020 16:42
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Styler conditional formatting using DataFrame.style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants