Преглед на файлове

Fix oidc client lookup query

join condition referenced the wrong table.  Worked fine unless there were multiple identical client IDs
Grant Limberg преди 2 години
родител
ревизия
9a8b74d744
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      controller/PostgreSQL.cpp

+ 1 - 1
controller/PostgreSQL.cpp

@@ -460,7 +460,7 @@ AuthInfo PostgreSQL::getSSOAuthInfo(const nlohmann::json &member, const std::str
 			    "LEFT OUTER JOIN ztc_network_oidc_config noc "
 				"  ON noc.network_id = n.id "
 				"LEFT OUTER JOIN ztc_oidc_config oc "
-				"  ON noc.client_id = oc.client_id AND noc.org_id = o.org_id "
+				"  ON noc.client_id = oc.client_id AND oc.org_id = o.org_id "
 				"WHERE n.id = $1 AND n.sso_enabled = true", networkId);
 		
 			std::string client_id = "";