PKUHPC / scow-slurm-adapter

11 stars 6 forks source link

一些代码中存在的问题 #4

Closed ddadaal closed 1 year ago

ddadaal commented 1 year ago
  1. 打开数据库连接后没有关闭

https://github.com/PKUHPC/scow-slurm-adapter/blob/f18584e81fd820646181f8ee3098e301b4bf4ee8/main.go#L49

  1. 使用字符串连接拼接SQL,存在严重安全漏洞SQL注入:https://go.p2hp.com/doc/database/sql-injection

https://github.com/PKUHPC/scow-slurm-adapter/blob/f18584e81fd820646181f8ee3098e301b4bf4ee8/main.go#L67

  1. 没有按要求使用Rich Error Model返回具体错误类型

https://github.com/PKUHPC/scow-slurm-adapter/blob/f18584e81fd820646181f8ee3098e301b4bf4ee8/main.go#L70