security

package
v0.0.0-...-a1b16c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 13 Imported by: 0

README

Security

可以扫描请求body或param进行安全拦截

SQL注入

搜索文本或是任何的字符串字句都会可能有sql注入的风险。

.Where("account_id = ?",id)

这种语句没有风险,id为非string类型

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptchaVerify

func CaptchaVerify(code, cid string) bool

func CryptoPasswd

func CryptoPasswd(raw string) string

func GenerateAtk

func GenerateAtk() string

func GenerateAtkSession

func GenerateAtkSession() string

func GenerateCaptcha

func GenerateCaptcha(w http.ResponseWriter, r *http.Request)

func GetRandom

func GetRandom() string

func Init

func Init()

func ToSHA512

func ToSHA512(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL