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

Various improvements and JSON-friendly additions #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sethadam1
Copy link

This pull request accomplishes a few things:

  • Implements an allowlist (sometimes called a "greenlist") which specifies tables that ARE exposed. If populated, no other tables will be returned, for enhanced security.
  • When there is no JSON response, instead of a string with an HTTP error code, an empty object or an JSON-wrapped error message is returned.
  • Removes references to "blacklist," which is politically touchy, and replaces with "blocklist."
  • Updates README to accommodate above changes
  • Removes unneeded .DS_Store file

This has been tested on PHP 7.3, but should work on PHP 5.4+.

- Implements an allowlist (sometimes called a "greenlist") which specifies tables that ARE exposed. If populated, no other tables will be returned, for enhanced security.
- When there is no JSON response, instead of a string, an empty object is returned. 
- Removes references to "blacklist," which is politically touchy, and replaces with "blocklist."
Updated README to include all changes
@sethadam1
Copy link
Author

To achieve PHP <5.4 compatibility, I believe the only change would be replacing "[]" on line 444 of class-.db-api.php with array().

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

1 participant