Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant