Skip to content

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.

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