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

False positive - SQL injection #1002

Closed
JasonBarnabe opened this Issue Feb 18, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@JasonBarnabe
Contributor

JasonBarnabe commented Feb 18, 2017

subset_clause = case script_subset
	when :greasyfork
		"AND `sensitive` = false"
	when :sleazyfork
		"AND `sensitive` = true"
	else
		""
end
sql =<<-EOF
	SELECT
		text, SUM(daily_installs) install_count, COUNT(s.id) script_count
	FROM script_applies_tos
	JOIN scripts s ON script_id = s.id
	WHERE
		domain
		AND script_type_id = 1
		AND script_delete_type_id IS NULL
		AND !tld_extra
		#{subset_clause}
	GROUP BY text
	ORDER BY text
EOF
by_sites = Script.connection.select_rows(sql)

"Possible SQL injection".

@presidentbeef

This comment has been minimized.

Show comment
Hide comment
@presidentbeef

presidentbeef Feb 18, 2017

Owner

Yeah, same as #972 and #944

Owner

presidentbeef commented Feb 18, 2017

Yeah, same as #972 and #944

Repository owner locked and limited conversation to collaborators May 18, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.