Automattic / Automattic/jetpack

Sync: clarify use of base64 encoding

Open
#24,842 2 comments 0 reactions 0 assignees View on GitHub
[Package] Sync [Pri] Normal [Type] Janitorial
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

It would be nice if we could expand our inline documentation in that file:
https://github.com/Automattic/jetpack/blob/afce3f6e68346ec2de554c37b4fbf05dfdd5fd7f/projects/packages/sync/src/class-json-deflate-array-codec.php#L27-L45

The use of `base64_encode` and `base64_decode` is often flagged by security plugins (it's forbidden in WPCS for a reason), but we do not provide much explanation as to why we implemented things that way in the file. Site owners or plugin authors landing on that file would need more details to know why it is safe to keep using that plugin.

Contributor guide

Open the contributing guide

Research direction

Open projects/packages/sync/src/class-json-deflate-array-codec.php around lines 27-45 and review the existing inline documentation alongside the base64_encode and base64_decode calls. Update that documentation to explain why these calls are used and why the usage is safe despite security-plugin warnings. Done means site owners and plugin authors have enough context to understand the implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.