SkyMen-Lab / StorageService

Service for storing and accessing teams and game session for the P0ng

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No verification for RouterIPAddress entry

N0ne1eft opened this issue · comments

The /api/team/create method is allowing any string value for routerIPAddress. Although verification can be added in other micro services before http request being sent I suggest adding database side verification would be better.

CleanShot 2019-12-27 at 05 31 37@2x

CleanShot 2019-12-27 at 05 33 45@2x

No error was reported in the database side log

info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (1ms) [Parameters=[@p0='?' (DbType = Int32), @p1='?', @p2='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      INSERT INTO "Configs" ("ConnectionType", "RouterIpAddress", "RouterPort")
      VALUES (@p0, @p1, @p2)
      RETURNING "Id";

To be fixed

has been solved in b81a7af