Fix issues from the security audit#7
Open
hintsanp wants to merge 8 commits into
Open
Conversation
Fixes finding C5 in BRAINSTORM-3396.
Fixes findings M2 and M3 in BRAINSTORM-3396.
Relocate password reading into a separate function and change the logic to use standard ifstream. Fixes finding M5 in BRAINSTORM-3396.
Add test harness for building and running server unit tests. The harness is a bit kludgy due to the fact that the server functions are not build into a library. Also, recursive Makefiles make dependency handling difficult. Add tests for readPassword utility function.
This reverts commit cb7706c. Running unit tests in CircleCI requires more effort than it is worth, so revert them.
std::string::substr is called with wrong arguments; fix that. Fixes finding L4 in BRAINSTORM-3396.
At its end, the main function enters a loop where it waits for signals. There, select function with empty file descriptor sets is used to emulate usleep/nanosleep. This commit replaces select and its elaborate error handling with sleep_for. Fixes finding L7 in BRAINSTORM-3396.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix few issues from the security audit in SmartMet server code. These follow the suggested order at the end of BRAINSTORM-3396.