Giter Club home page Giter Club logo

gorobbs's Introduction

Gorobbs
轻而快,为实用而构建



简介

Gorobbs 是一款轻巧的内置了全文搜索引擎的的BBS系统, 专为普通用户设计,开箱即用,无需复杂配置。我们的目标是打造最轻量化的分布式BBS系统!

案例

功能

  • 多用户BBS
  • 自定义导航
  • 多主题 / 多语言
  • MySQL + Redis
  • 内置轻巧的全文搜索引擎
  • 良好的SEO优化

界面

首页

start

登录后效果

start

手机版

start

编辑帖子

console

帖子详情

post

后台某页面

post

新增界面

第三方登录:微信登录

post

安装

项目依赖包

  • github.com/gin-gonic/gin
  • gopkg.in/gomail.v2
  • github.com/tommy351/gin-sessions
  • github.com/sirupsen/logrus
  • github.com/rifflock/lfshook
  • github.com/unknwon/com
  • github.com/astaxie/beego/validation
  • github.com/aviddiviner/gin-limit
  • github.com/huichen/wukong
  • github.com/go-ini/ini
  • github.com/gomodule/redigo/redis
  • github.com/lestrrat-go/file-rotatelogs
  • github.com/jinzhu/gorm
  • github.com/jinzhu/gorm/dialects/mysql
  • github.com/dgrijalva/jwt-go

项目环境依赖

  • golang 1.11 and above
  • mysql 5.6 and above
  • redis 5 and above
  • 若安装在生产环境,推荐使用Nginx1.16

本地试用

方案一: 使用 gomod

  • 在具有读写权限的目录克隆代码: git clone https://github.com/letseeqiji/gorobbs.git;
  • 执行命令:go mod tidy;
  • 解压静态包:打开 gorobb/static 将static.zip解压到static目录;
  • 配置文件: 打开 gorobbs/conf/app.ini 并配置数据库和redis;
  • 导入sql数据: 导入 gorobbs/gorobbs.sql 到本地MYSQL数据库;
  • 运行: 进入 gorobbs 目录,运行命令: go run main.go;
  • 访问地址: http://127.0.0.1:9000 端口号在配置文件中可以配置;
  • 测试用用户名和密码: 地址:[email protected] 密码:123456;

方案二: 不使用 gomod

  • 切换目录: 首先进入到本地的GOPATH目录;
  • 克隆代码: git clone https://github.com/letseeqiji/gorobbs.git;
  • 进入gorobbs目录,可以将目录下vendor目录的内容复制到GOPATH目录;
  • 解压静态包:打开 gorobb/static 将static.zip解压到static目录;
  • 配置文件: 打开 gorobbs/conf/app.ini 并配置数据库和redis;
  • 导入sql数据: 导入 gorobbs/gorobbs.sql 到本地MYSQL数据库;
  • 运行: 进入 gorobbs 目录,运行命令: go run main.go;
  • 访问地址: http://127.0.0.1:9000 端口号在配置文件中可以配置;
  • 测试用用户名和密码: 地址:[email protected] 密码:123456;

方案三: 使用docker

  • docker容器下载:链接: https://pan.baidu.com/s/1eYq51V2ZRxIVeE9dEDtOWw 提取码: tm1c ;
  • 使用dokcer import 命令加载本地容器;
  • 内部已经安装好了mysql redis 和 gorobbs可执行文件;
  • 数据库:端口映射9005:3306,user:root, password:abc123456;
  • gorobbs: 端口映射9006:9006;
  • 容器内文件路径,gorobbs:/home/gobbs, redis:/usr/local/redis;
  • 测试用用户名和密码: 地址:[email protected] 密码:123456;

文档

社区

授权

Gorobbs 使用 BSD 开源协议。

鸣谢

  • jQuery:JavaScript 工具库,用于主题页面
  • Gin:又快又好用的 golang HTTP web 框架
  • GORM:极好的 golang ORM 库

开源项目推荐

gorobbs's People

Contributors

dependabot[bot] avatar imanner avatar letseeqiji 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  avatar  avatar

gorobbs's Issues

线上项目部署出问题

线上项目部署到centos上,无论是登陆还是注册,接口都报502,本地测试是没有问题的,线上可看不到错误,求解决啊!!!有没有QQ群,可以加一下,讨论一下

有bug

还没登录,直接输 /admin/setting/base.html
可以设置成功。

Potential ReDoS Vulnerability or Inefficient Regular Expression in Project: Need for Assessment and Mitigation

Hello,

I am writing to report a potential Regular Expression Denial of Service (ReDoS) vulnerability or Inefficient Regular Expression in the project. This issue arises when specially crafted input strings are used in the context of distributed, high-volume requests, potentially leading to a denial-of-service attack.

Location of Issue:

The vulnerability is related to a regular expression used in the following validation file, which may result in significantly prolonged execution times under certain conditions.

re := regexp.MustCompile(`(?s)<(?:style|script)[^<>]*>.*?</(?:style|script)>|</?[a-z][a-z0-9]*[^<>]*>|<!--.*?-->`)

PoC Files and Comparisons:

// Proof of concept
filename := os.Args[1]
content, err := ioutil.ReadFile(filename)
re := regexp.MustCompile("(?s)<(?:style|script)[^<>]*>.*?</(?:style|script)>|</?[a-z][a-z0-9]*[^<>]*>|<!--.*?-->")
re.ReplaceAllString(string(content), "")

PoC Files Here:
poc.zip

To evaluate the performance of this inefficient regular expression matching with varying input contents, the following commands can be executed within the PoC folder:

time ./poc AttackString10MB.txt
# real    72m38.173s
# user    72m30.083s
# sys     0m5.653s
time ./poc RandomString10MB.txt
# real    0m0.029s
# user    0m0.016s
# sys     0m0.026s
time ./poc AttackString1MB.txt
# real    0m54.028s
# user    0m53.917s
# sys     0m0.088s
time ./poc RandomString1MB.txt
# real    0m0.011s
# user    0m0.007s
# sys     0m0.011s

The significant difference in processing time between random strings and malicious strings highlights the potential effectiveness of this regex for malicious exploitation. And as string length grows, the nonlinear increase in processing time reflects potentially greater risks.

Proposed Solution:

A possible mitigation strategy could include limiting the input length to prevent excessive processing times. If the corresponding function or feature is not in use, it is recommended to clean up risky third-party packages or code content to prevent malicious exploitation through methods such as code injection.

Additional Considerations:

Historically, it was believed that using regex engines with non-backtracking implementations (such as those in Rust or Go) would not lead to ReDoS vulnerabilities. However, recent studies have shown that this is not always the case. I recommend an assessment of how this issue might impact this project.

Thank you for your attention to this matter. Your evaluation and response to this potential security concern would be greatly appreciated.

Best regards,

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.