-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSRF protection for project and recon commands
- Loading branch information
Showing
31 changed files
with
256 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
24 changes: 24 additions & 0 deletions
24
main/tests/server/src/com/google/refine/commands/project/ImportProjectCommandTests.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.google.refine.commands.project; | ||
|
||
import com.google.refine.commands.CommandTestBase; | ||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
|
||
import org.testng.annotations.BeforeMethod; | ||
import org.testng.annotations.Test; | ||
|
||
public class ImportProjectCommandTests extends CommandTestBase { | ||
|
||
@BeforeMethod | ||
public void setUpCommand() { | ||
command = new ImportProjectCommand(); | ||
} | ||
|
||
@Test | ||
public void testCSRFProtection() throws ServletException, IOException { | ||
command.doPost(request, response); | ||
assertCSRFCheckFailed(); | ||
} | ||
} | ||
|
23 changes: 23 additions & 0 deletions
23
main/tests/server/src/com/google/refine/commands/project/RenameProjectCommandTests.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.google.refine.commands.project; | ||
|
||
import com.google.refine.commands.CommandTestBase; | ||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
|
||
import org.testng.annotations.BeforeMethod; | ||
import org.testng.annotations.Test; | ||
|
||
public class RenameProjectCommandTests extends CommandTestBase { | ||
|
||
@BeforeMethod | ||
public void setUpCommand() { | ||
command = new RenameProjectCommand(); | ||
} | ||
|
||
@Test | ||
public void testCSRFProtection() throws ServletException, IOException { | ||
command.doPost(request, response); | ||
assertCSRFCheckFailed(); | ||
} | ||
} |
This file contains 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
23 changes: 23 additions & 0 deletions
23
main/tests/server/src/com/google/refine/commands/project/SetProjectTagsCommandTests.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.google.refine.commands.project; | ||
|
||
import com.google.refine.commands.CommandTestBase; | ||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
|
||
import org.testng.annotations.BeforeMethod; | ||
import org.testng.annotations.Test; | ||
|
||
public class SetProjectTagsCommandTests extends CommandTestBase { | ||
|
||
@BeforeMethod | ||
public void setUpCommand() { | ||
command = new SetProjectTagsCommand(); | ||
} | ||
|
||
@Test | ||
public void testCSRFProtection() throws ServletException, IOException { | ||
command.doPost(request, response); | ||
assertCSRFCheckFailed(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
main/tests/server/src/com/google/refine/commands/recon/GuessTypesOfColumnCommandTests.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.google.refine.commands.recon; | ||
|
||
import com.google.refine.commands.CommandTestBase; | ||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
|
||
import org.testng.annotations.BeforeMethod; | ||
import org.testng.annotations.Test; | ||
|
||
public class GuessTypesOfColumnCommandTests extends CommandTestBase { | ||
|
||
@BeforeMethod | ||
public void setUpCommand() { | ||
command = new GuessTypesOfColumnCommand(); | ||
} | ||
|
||
@Test | ||
public void testCSRFProtection() throws ServletException, IOException { | ||
command.doPost(request, response); | ||
assertCSRFCheckFailed(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
main/tests/server/src/com/google/refine/commands/recon/PreviewExtendDataCommandTests.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.google.refine.commands.recon; | ||
|
||
import com.google.refine.commands.CommandTestBase; | ||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
|
||
import org.testng.annotations.BeforeMethod; | ||
import org.testng.annotations.Test; | ||
|
||
public class PreviewExtendDataCommandTests extends CommandTestBase { | ||
|
||
@BeforeMethod | ||
public void setUpCommand() { | ||
command = new PreviewExtendDataCommand(); | ||
} | ||
|
||
@Test | ||
public void testCSRFProtection() throws ServletException, IOException { | ||
command.doPost(request, response); | ||
assertCSRFCheckFailed(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
main/tests/server/src/com/google/refine/commands/recon/ReconClearOneCellCommandTests.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.google.refine.commands.recon; | ||
|
||
import com.google.refine.commands.CommandTestBase; | ||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
|
||
import org.testng.annotations.BeforeMethod; | ||
import org.testng.annotations.Test; | ||
|
||
public class ReconClearOneCellCommandTests extends CommandTestBase { | ||
|
||
@BeforeMethod | ||
public void setUpCommand() { | ||
command = new ReconClearOneCellCommand(); | ||
} | ||
|
||
@Test | ||
public void testCSRFProtection() throws ServletException, IOException { | ||
command.doPost(request, response); | ||
assertCSRFCheckFailed(); | ||
} | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.