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

Censor refactoring (using maps instead of arrays in blacklist and whitelist) [T657] #208

Merged
merged 6 commits into from
Jul 19, 2018
Merged

Censor refactoring (using maps instead of arrays in blacklist and whitelist) [T657] #208

merged 6 commits into from
Jul 19, 2018

Conversation

storojs72
Copy link
Contributor

No description provided.

@vixentael
Copy link
Collaborator

@@ -100,67 +94,53 @@ func testWhitelistTables(t *testing.T, acraCensor *AcraCensor, whitelistHandler
"INSERT INTO Customers (CustomerName, City, Country) VALUES ('Cardinal', 'Stavanger', 'Norway');",
"SELECT EMP_ID, LAST_NAME FROM EMPLOYEE_TBL AS EMPL_TBL WHERE CITY = 'Seattle' ORDER BY EMP_ID;",
}

err := whitelistHandler.AddQueries(testQueries)
whitelistHandler.AddQueries(testQueries)
if err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what we check here?

testQuery := "SELECT EMP_ID, LAST_NAME FROM EMPLOYEE, EMPLOYEE_TBL, CUSTOMERS WHERE CITY = 'INDIANAPOLIS' ORDER BY EMP_ID asc;"

err = whitelistHandler.AddQueries([]string{testQuery})
whitelistHandler.AddQueries([]string{testQuery})
if err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@@ -269,7 +242,7 @@ func TestBlacklistQueries(t *testing.T) {

testQuery := "INSERT INTO Customers (CustomerName, City, Country) VALUES ('Cardinal', 'Stavanger', 'Norway');"

err = blacklistHandler.AddQueries([]string{testQuery})
blacklistHandler.AddQueries([]string{testQuery})
if err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@storojs72 storojs72 merged commit 72a3b82 into cossacklabs:master Jul 19, 2018
@storojs72 storojs72 deleted the censor_refactoring branch July 19, 2018 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants