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

Remove logging capability from within JS #58

Closed
AndrewPoppe opened this issue Dec 10, 2021 · 2 comments
Closed

Remove logging capability from within JS #58

AndrewPoppe opened this issue Dec 10, 2021 · 2 comments
Labels
bug Something isn't working
Projects

Comments

@AndrewPoppe
Copy link
Owner

  • Instead initiate logs from JS but actual logging done from PHP
  • Can we remove JS module completely?
@AndrewPoppe AndrewPoppe added the bug Something isn't working label Dec 10, 2021
@AndrewPoppe AndrewPoppe added this to To do in To Do via automation Dec 10, 2021
@AndrewPoppe
Copy link
Owner Author

Seems that the log.php file used by the EM framework is open... need to find a workaround until they remove that

Idea 1:

  • Create a token that is stored in module's system settings
  • Whenever something is logged, include the token as a parameter
  • When fetching logs for any reason, check that the token field matches the expected value
  • Since this does NOT make logs from the JS module safe, will need to:
    • write a page that accepts post requests from ajax
    • verifies the user has permissions etc
    • calls module's log function, including the token

This hinges on the token being hard to guess and difficult to find.
Hard to guess is easy to do.
If the token is stored in module's system settings, then only REDCap admins would be able to access it, and even then only using another EM or by directly accessing MySQL.

@AndrewPoppe
Copy link
Owner Author

AndrewPoppe added a commit that referenced this issue Dec 11, 2021
AndrewPoppe added a commit that referenced this issue Dec 11, 2021
AndrewPoppe added a commit that referenced this issue Dec 12, 2021
AndrewPoppe added a commit that referenced this issue Dec 12, 2021
AndrewPoppe added a commit that referenced this issue Dec 12, 2021
AndrewPoppe added a commit that referenced this issue Dec 12, 2021
To Do automation moved this from To do to Done Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
To Do
Done
Development

No branches or pull requests

1 participant