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

Fix A3 SSType #643

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

LorennaCunha
Copy link

This solution refers to which of the apps?

A3 - SSType

What did you do to mitigate the vulnerability?

Replaced 'NAMEHERE' with '{{ name }}' in the template and used Tornado's secure rendering to handle user input safely.

Did you test your changes? What commands did you run?

I tested the changes by reproducing the attack narrative.

@@ -126,16 +126,16 @@ func InitDatabase() error {

dbConn, err := OpenDBConnection()
if err != nil {
errOpenDBConnection := fmt.Sprintf("OpenDBConnection error: %s", err)
errOpenDBConnection := ("OpenDBConnection error: %s" + err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you make this modification?

Copy link
Author

Choose a reason for hiding this comment

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

It has nothing to do with the vulnerability, I just saw that it is a string formatting practice in Go

_, err = dbConn.Exec(queryCreate)
if err != nil {
errInitDB := fmt.Sprintf("InitDatabase error: %s", err)
errInitDB := ("InitDatabase error: %s" + err)
Copy link
Contributor

Choose a reason for hiding this comment

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

The same question as line 129.

Copy link
Author

Choose a reason for hiding this comment

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

the same response for line 129

Copy link
Contributor

Choose a reason for hiding this comment

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

This commit is about another application. Could you split this PR into three others?

Copy link
Author

Choose a reason for hiding this comment

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

I did the labs in sequence and I think I didn't start the branch at the right time for SSType, can you help me fix this? Should I delete the PRs and redo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants