Aircloak / aircloak

This repository contains the Aircloak Air frontend as well as the code for our Cloak query and anonymization platform
2 stars 0 forks source link

Explorer crashing when endpoint returns 400 #4397

Closed sebastian closed 4 years ago

sebastian commented 4 years ago
   ** (EXIT) an exception was raised:
        ** (WithClauseError) no with clause matching: {:ok, %HTTPoison.Response{body: "", headers: [{"Server", "nginx/1.6.2"}, {"Date", "Tue, 02 Jun 2020 16:50:00 GMT"}, {"Content-Length", "0"}, {"Connection", "keep-alive"}], request: %HTTPoison.Request{body: "{\"ApiKey\":\"SFMyNTY.g3QAAAACZAAEZGF0YW0AAAAkODNkMjYwNjEtMzkxZS00MmQzLTk5ZjEtMDljODhlZGJmNzhiZAAGc2lnbmVkbgYAcZTwdXIB.oyyUV-Fi_NsIoIVT4ZN5-eCxPGVP4kxA8Z6Y3S1tjSY\",\"ColumnName\":\"type\",\"DataSourceName\":\"Clinic\",\"TableName\":\"addresses\"}", headers: [{"Content-Type", "application/json"}], method: :post, options: [], params: %{}, url: "https://explorer.aircloak.com/api/explore"}, request_url: "https://explorer.aircloak.com/api/explore", status_code: 400}}
            (air) lib/air/service/explorer.ex:160: Air.Service.Explorer.request_analysis_for_column/4
            (elixir) lib/enum.ex:783: Enum."-each/2-lists^foreach/1-0-"/2
            (elixir) lib/enum.ex:783: Enum.each/2
            (elixir) lib/enum.ex:783: Enum."-each/2-lists^foreach/1-0-"/2
            (elixir) lib/enum.ex:783: Enum.each/2
            (air) lib/air/service/explorer.ex:89: Air.Service.Explorer.handle_call/3
            (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4
            (stdlib) gen_server.erl:690: :gen_server.handle_msg/6

I am assuming it hasn't been configured correctly on attack, but currently it's returning a nasty server crash.

gampleman commented 4 years ago
  1. That looks more like a 400 rather than a 404?
  2. Can we still replicate this issue?
sebastian commented 4 years ago

You are right! I updated the title. I have no idea how to replicate this.

sebastian commented 4 years ago

We are now logging an error instead: https://github.com/Aircloak/aircloak/commit/7500e3ab08f8e8a1e318116c62325cc40baf3941