if v := req.URL.Query().Get("pending_delete"); v != "" {
// ignore other behavior and fetch pending objects from the ip_prefixes_deleted table
prefixes, err := c.RO().IPPrefixes().FetchPrefixesPendingDeletion(ctx)
[..snip..]
}
What's implied but not shown here is that endpoint normally returns all prefixes. They modified it to return just those pending deletion when passing a pending_delete query string parameter. /v1/prefixes?pending_delete <-- doesn't execute block
This is because Go defaults query params to empty strings and the if statement skips this case. Which makes you wonder, what is the value supposed to be? This is not explained. If it's supposed to be: /v1/prefixes?pending_delete=true <--- executes block
Then this would work, but the implementation fails to validate this value. From this you can infer that no unit test was written to exercise the value: /v1/prefixes?pending_delete=false <-- wrongly executes block
The post explains "initial testing and code review focused on the BYOIP self-service API journey." We can reasonably guess their tests were passing some kind of "true" value for the param, either explicitly or using a client that defaulted param values. What they didn't test was how their new service actually called it.
Remember it's not just about pornography. It's anything deemed "harmful to minors" including platforms like Reddit, Bluesky or stuff conservative lawmakers think is harmful like discussion forums for LGBTQ people, sexual health information or dissident political opinions.
They also examine how these laws, which are often backed by the religious Right, are getting support more broadly from people who see it as a way to rein in Big Tech who are creating "social media addiction" and so forth.
And even within our industry there is a lot of money to be made by creating and selling compliance products, so even on forums like this you will find people advocating for them.
"Another Internet Law That Punishes Everyone" - Power User Podcast 1/9/26: https://www.youtube.com/watch?v=8bnp3nmpK9g