Giter Club home page Giter Club logo

movie_recommend's Issues

sql注入

您好:
我是360代码卫士的工作人员,在我们的开源代码检测项目中发现Movie_Recommend存在sql注入漏洞。
详细信息如下:
在indexController.java文件的showtypesortmovie()中接受了请求中的sort参数并绑定到Selectquery对象中
default
最后调用了SortMoiveBycategory方法,跟进该方法对应的xml
default
由于mybatis中order by 后面的参数如果是用的#,排序将不起效果,所以开发人员用的$,但这样同时也导致了sql注入的存在。

复现:略
修复方法:在java层面上做映射,比如说用户只能输入1-5,然后在代码层面将其映射为字段名,然后再使用${}

赞一个

val jdbcURL = "jdbc:mysql://movie2:3306/recommend?useUnicode=true&characterEncoding=utf-8"
val alsTable = "recommend.alsTab"
val recResultTable = "recommend.similarTab"
val top5Table = "recommend.top5Result"
val userTable= "recommend.user"
val ratingTable= "recommend.rating"

在附件sql中只看到movie的sql没看到这几个

可以跑起来

可以跑起来,不过要是能实现在线播放就好了,目前来说,抓取的是一些磁力链信息。boseb.com

项目提问

请问一下有该项目相关视频教程吗?可以分享下吗,谢谢了

怎么运行起来

您好,您这个代码我下载下来了,没有main函数,我也不知道怎么跑?大佬能不能给我这个新手一点建议

关于网站埋点捕获点击事件的疑问

ZzXxL1994你好,你在项目描述说: 通过在电影网站系统埋点,获取到用户的点击事件(如用户喜欢哪部电影或对某部电影的评分)并将信息传至推荐系统,推荐系统根据该信息做出相应的处理。

nginx.conf配置文件的疑问

nginx.conf文件

log_format my_format '$args';
...
       location = /log.gif {
  	    default_type image/gif;
   	    access_log /opt/movieLog/access.log my_format;
	}

问题1:请问这里匹配的uri是/log.gif是记录用户的什么请求?$args是什么参数?

流处理类SparkDrStreamALS.scala中处理日志的疑问

SparkDrStreamALS.scala

val messages = KafkaUtils.createDirectStream[String, String, StringDecoder, StringDecoder](ssc, kafkaParams, topics)
val messagesDStream = messages.map(_._2).map(line => {
      var rating: UserRating = null
      if (line != null) {
        try {
          val fields = line.split(",")
          if (fields.length == 3) {
            rating = UserRating(fields(0).toInt, fields(1).toInt, fields(2).toDouble)
          }
        } catch {
          case e => e.printStackTrace()
        }
      }
      rating
    })

问题二:按照nginx配置的log_format的$args ,这个变量等于请求行中的参数,日志行的内容类似p=boo&q=foo,请问通过KafkaUtils.createDirectStream后的message RDD是怎样子的?后面使用message.map(_._2).map(line=>{…}应该是取得message的第二个元组作为line,请问是kafka的api自动将“&”符号映射为“,”逗号作为分隔符的吗?或是flume做了转换了吗?但是在flume*.properties未看到相关配置,只看到tail -F /opt/movieLog/access.log

Error:(3, 26) java: 程序包org.csource.common不存在

MoviceManager 启动报错:

Error:(3, 26) java: 程序包org.csource.common不存在
Error:(4, 27) java: 程序包org.csource.fastdfs不存在
Error:(5, 27) java: 程序包org.csource.fastdfs不存在
......

开发环境 Ubuntu16.04 + IDEA + JDK8
升级fastdfs-client版本解决.

<dependency>
  <groupId>net.oschina.zcx7878</groupId>
  <artifactId>fastdfs-client-java</artifactId>
  <version>1.27.0.0</version>
</dependency>

jar包如何打

你好,请问哪些上传到linux的jar包是如何打出来的?我在Eclipse中打jar包的时候总是会出错,比如说打ETL.jar这个jar包。谢谢你。

nginx的使用

项目很赞!博主能详细说一下nginx怎么获取用户点击数据的吗?

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.