barats / ohUrlShortener

适合中小型社区网站使用的企业级短链接服务系统,支持短链接生产、查询及302转向,并自带点击量统计、独立IP数统计、访问日志
https://www.ohurls.cn
Other
366 stars 58 forks source link

在管理端点中发现未经授权的访问。 #11

Closed douglas-oliveira-tc closed 2 years ago

douglas-oliveira-tc commented 2 years ago

I was implementing your project for an internal experimentation, and found a critical issue that allows unauthenticated users to bypass auth controls.

Steps to reproduce:

curl -i -s -k -X $'POST' -H $'Host: admin.ohUrlShortener.com' -H $'Referer: http://admin.ohUrlShortener.com/admin/urls' -H $'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H $'Content-Length: 18' --data-binary $'short_url=Ak3vaj58' $'http://admin.ohUrlShortener.com/admin/urls/delete'

image

All examples were run in my environment, the address used is only for illustration purposes.

barats commented 2 years ago

I'll check for this issue, TODAY.

barats commented 2 years ago

Turns out, it was my bad. Sorry about it.

Already fixed this issue and drafted a new release: https://github.com/barats/ohUrlShortener/releases/tag/v1.7

image

douglas-oliveira-tc commented 2 years ago

That's great, thanks a lot!

barats commented 2 years ago

That's great, thanks a lot!

I should thank you for reporting this issue.