Giter Club home page Giter Club logo

barats / ohurlshortener Goto Github PK

View Code? Open in Web Editor NEW
344.0 344.0 57.0 32.73 MB

适合中小型社区网站使用的企业级短链接服务系统,支持短链接生产、查询及302转向,并自带点击量统计、独立IP数统计、访问日志

Home Page: https://www.ohurls.cn

License: Other

Go 66.95% Shell 0.29% HTML 21.69% CSS 0.33% JavaScript 4.40% Dockerfile 1.21% PLpgSQL 5.13%
golang productivity screenshot shorturl shorturl-services url-shortener urlshortener

ohurlshortener's Introduction

👋 Hi

Barat Semet (بارات سەمەت ) | Passionate about Open Source | Coder

巴拉迪维
漂泊异乡的难民
10+年软件开发小白
不务正业的互联网老兵
整个地球最坏的那个民族

https://barats.cn

✨ Things I make use of

Java IntelliJ IDEA Golang Visual Studio Code Docker Insomnia git

💻 My Github Summary

ohurlshortener's People

Contributors

barats avatar houseme avatar maodagesecond avatar normal-coder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ohurlshortener's Issues

验证码只能单机使用?

多台机部署时,验证码加载失败,刷新又显示,发现验证码的值时存在,内存中的。作者有打算替换验证码的包吗?

复制短链没有反应

环境:mac book pro 使用 chrome 浏览器

点击复制短链没反应, 打开 chrome 控制台看到如下报错:

admin.js:190 Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')
    at copy_url (admin.js:190:23)
    at <anonymous>:1:1
copy_url @ admin.js:190
(anonymous) @ VM77:1

Golang redis 语法错误:ERR syntax error

return RedisSet(key, value, redis.KeepTTL)

使用的包:"github.com/go-redis/redis/v8"

错误的语法:

if err := rd.Set(ctx, key, val, -1).Err(); err != nil {
    panic(err)
}

结果:

低版本的`redis`不支持 `-1`来设置ttl,出现语法的版本为<5.0
升级版本即可

如果开发环境能能正常运行,到测试环境就拉胯,大概率是环境问题
目前阿里云的集群和主从的5.0.5版都有这个问题。

Translations

Hello!

I'm the same user who submitted the issue #11 before, but using my personal account.

I've translated this project to english, and I would love to contribute towards translating it to ru_RU or pt_BR.

Do you know if there's a way to collaborate towards that goal?

I've already translated to en_US (but this repo is outdated with that issues still presenting).

Thanks!

运行一键式脚本报错:The Compose file './pull_build.yml' is invalid

root@ubuntu:/docker# ./one_step_start.sh ERROR: The Compose file './pull_build.yml' is invalid because: networks.ohurlshortener value Additional properties are not allowed ('name' was unexpect ed) services.ohurlshortener-admin.depends_on contains an invalid type, it should be an array services.ohurlshortener-portal.depends_on contains an invalid type, it should be an arra y

打开浏览器限制 (Browser restriction support)

          由于前期设计的时候,没考虑过这种情况。

分析了一下,如果现在要实现它的话,需要在 302 之前再做一次数据库查询。
这样速度就会慢很多。
所以,这个需求我暂时挂起。等我再下个阶段考虑怎么样优化吧!

Originally posted by @barats in #14 (comment)

sql 统计错误

(SELECT count(ip) FROM public.access_logs WHERE date(ACCESS_TIME) = (NOW() - INTERVAL '7 day')::date AND short_url = u.short_url) AS last_7_days_count,

这个sql统计的是过去第七天的数据,而不是累计七天的数据 应该是大于 而不是等于

多用户操作的GUI支持

          多用户操作功能,其实是支持的。

不过用户管理(用户的CURD操作)尚未在后台界面中支持。

近期考虑新增这部分功能。

Originally posted by @barats in #9 (comment)

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

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.

同学,您这个项目引入了79个开源组件,存在2个漏洞,辛苦升级一下

检测到 barats/ohurlshortener 一共引入了79个开源组件,存在2个漏洞

漏洞标题:go-yaml < 2.2.8拒绝服务漏洞
漏洞编号:CVE-2019-11254
漏洞描述:gopkg.in/yaml.v2是go语言中用于处理yaml格式的包。
在2.2.8之前的版本中,处理恶意的yaml数据时,会导致CPU资源耗尽。
漏洞由Kubernetes开发者在fuzz测试中发现并提交修复补丁。
国家漏洞库信息:https://www.cnvd.org.cn/flaw/show/CNVD-2020-35519
影响范围:(∞, 2.2.8)
最小修复版本:2.2.8
缺陷组件引入路径:ohurlshortener@->github.com/gin-gonic/[email protected]>github.com/stretchr/[email protected]>gopkg.in/[email protected]

另外还有2个漏洞,详细报告:https://mofeisec.com/jr?p=n55ac7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.