SSO e Screened IPs

Forse ho parlato troppo in fretta. :disappointed_face:

Dopo aver corretto i parametri truthy/falsy nelle stringhe ‘true’/‘false’, continuo a vedere voci aggiunte a IP schermati ed Email schermate quando elimino gli utenti.

Ecco i log di Rails per una chiamata API:

Started DELETE "/admin/users/9553.json" for 123.123.123.123 at 2021-06-10 00:01:21 +0000
Processing by Admin::UsersController#destroy as JSON
  Parameters: {"delete_posts"=>"false", "block_email"=>"false", "blocked_urls"=>"false", "block_ip"=>"false", "id"=>"9553"}
Can't verify CSRF token authenticity.
  Rendering text template
  Rendered text template (Duration: 0.0ms | Allocations: 1)
Completed 418  in 8ms (Views: 1.4ms | ActiveRecord: 0.0ms | Allocations: 2301)

E qui la richiesta effettuata tramite l’interfaccia web invece che chiamando l’API:

Started DELETE "/admin/users/49.json" for 123.123.123.123 at 2021-06-10 08:24:47 +0000
Processing by Admin::UsersController#destroy as JSON
  Parameters: {"context"=>"/admin/users/49/XXX", "delete_posts"=>"true", "id"=>"49"}
  Rendered text template (Duration: 0.0ms | Allocations: 1)
Completed 418  in 23ms (Views: 4.7ms | ActiveRecord: 0.0ms | Allocations: 1778)

Quindi, dopo alcuni test, sembra che i parametri per l’endpoint API /admin/users/{id}.json vengano sempre interpretati come true quando sono presenti, indipendentemente dal fatto che siano effettivamente impostati su ‘true’ o ‘false’?

Una volta iniziato a impostare solo i parametri che erano ‘true’, saltando quelli ‘false’, non vengono più aggiunte voci agli IP/Email schermati.

È questo il comportamento previsto? Non è quello che ho capito dalla documentazione.