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: Corrects ability to disable all blocking from the CLI by not providing any groups #1373

Merged

Conversation

BenMcH
Copy link
Contributor

@BenMcH BenMcH commented Feb 10, 2024

This PR fixes #1336 and restores the v0.22 behavior of calling blocky blocking disable without any additional arguments. It appears that in #1129, we lost the following check from api_endpoints.go, lines 123-126:

	groupsParam := req.URL.Query().Get("groups")
	if len(groupsParam) > 0 {
		groups = strings.Split(groupsParam, ",")
	}

This parsing, being done by hand, allowed us to receive a query string, groups= and implicitly drop this variable. This PR adds this check back in

Copy link

codecov bot commented Feb 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9f633f1) 93.97% compared to head (cee6075) 93.97%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1373   +/-   ##
=======================================
  Coverage   93.97%   93.97%           
=======================================
  Files          78       78           
  Lines        6361     6361           
=======================================
  Hits         5978     5978           
  Misses        294      294           
  Partials       89       89           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ThinkChaos ThinkChaos left a comment

Choose a reason for hiding this comment

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

Thanks for looking into it and finding the root cause!

api/api_interface_impl.go Outdated Show resolved Hide resolved
@ThinkChaos ThinkChaos merged commit fe84ab8 into 0xERR0R:main Feb 10, 2024
11 checks passed
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.

v0.23 broke blocky blocking disable
2 participants