This repository has been archived by the owner on Oct 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Frontend passes target to backend #119
Closed
Closed
Changes from 4 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2e714dc
update status
Masclins c8b9777
using target-string-path
Masclins 15ab2ac
change tests
Masclins 867643f
bug
Masclins 93f0cee
remove load-string
Masclins 039e810
passing new target
Masclins 4f5ee89
target for untargeted
Masclins baf7d78
parse-int
Masclins 3b9cd0c
Merge branch 'develop' into com-target
kenan-rhoton a70501f
Tests for api (#129)
Masclins fec29f9
Dev practices (#132)
Masclins 68f95d0
Merge branch 'com-target' of https://github.com/Masclins/card-game in…
Masclins b06664c
so there's no doubt
Masclins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,12 @@ test('Playing cards changes background as intended', () => { | |
play.playCard(card); | ||
expect(card.style.background).toBe("green"); | ||
|
||
card = document.createElement("div"); | ||
card.setAttribute("add-power", 1); | ||
play.playCard(card); | ||
expect(card.style.background).toBe("yellow"); | ||
|
||
card.setAttribute("target", 1); | ||
card.setAttribute("target", "[:rows 0 :cards 0]"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We cannot send Clojure code. Either split the information into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The removal of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test only checks the card has a target, it doesn't checks if the target is correct. |
||
play.playCard(card); | ||
expect(card.style.background).toBe("green"); | ||
}); |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
load-string
is a security issue, it is executing arbitrary Clojure code contained in a string received from an external connection.A malicious user could alter the value being sent as
target
and run any kind of code on the system, compromising the entire backend.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a reminder: this pull request cannot be accepted until it doesn't use vulnerable things such as
load-string