题目详情

某大型匹萨加工和销售商为了有效管理匹萨的生产和销售情况,欲开发一套基于Web的信息系统。其主要功能为销售、生产控制、采购、运送、存储和财务管理等。系统采用Java EE平台开发,页面中采用表单实现数据的提交与交互,使用图形(Graphics)以提升展示效果。

问题1:设计两个表单项输入测试用例,以测试XSS(跨站点脚本)攻击。系统设计时可以采用哪些技术手段防止此类攻击。

问题2:简述图形测试的主要检查点。

问题3:简述页面测试的主要方面。

问题4:系统实现时,对销售订单的更新所用的SQL语句如下:

PreparedStatement pStmt=connection.prepareStatement("UPDATE SalesOrder SET status= ? WHERE OrderID= ?")

然后通过setString(...);的方式设置参数值后加以执行。

设计测试用例以测试SQL注入,并说明该实现是否能防止SOL注入。

正确答案及解析

正确答案
解析

问题1:XSS(跨站点脚本攻击)是一种注入式攻击,主要通过恶意脚本进行攻击,任何脚本如<SCRIPT>都不该被接受。

(1)<script>alert('Wufff!')</script>

(2)<b onmouseover=alert('Wufff!')>click me!</b>

防止的主要手段是对功能符号进行编码(转义)。

问题2:图形测试的主要检查点如下:

(1)颜色饱和度和对比度是否合适;

(2)需要突出的链接的颜色是否容易识别;

(3)是否正确加载所有的图形。

问题3:页面测试可以从以下几个方面进行:

(1)页面的一致性;

(2)在每个页面上是否设计友好的用户界面和直观的导航系统;

(3)是否考虑多种浏览器的需要;

(4)是否建立了页面文件的命名体系;

(5)是否充分考虑了合适的页面布局技术,如层叠样式表、表格和帧结构等。

问题4:设计如下测试:[注:设计类似如下用例即可,其中包含SQL功能符号使SQL变为不符合设计意图即可]

status: 'fulfilled' --, OrderID: '2014' OR '1'='1'

采用传递参数的形式,Java的JDBC驱动自动会将其按照相应的类型处理,功能符号会进行转义。因此,该SQL语句是安全。

包含此试题的试卷

你可能感兴趣的试题

单选题

Advancements in ( )have contributed to the growth of the automotive industry through the creation and evolution of self-driving vehicles.

  • A.Artificial Intelligence
  • B.Cloud Computing
  • C.Internet of Things
  • D.Big Data
查看答案
单选题

In project human resource management , ( )is not a source of power for the project manager.

  • A.referent power
  • B.expert power
  • C.reward power
  • D.audit power
查看答案
单选题

At the project establishment stage , the feasibility study mainly includes techinical feasibility analysis , ( ), operation environment feasibility analysis and other aspects of feasibility analysis.

  • A.detail feasibility analysis
  • B.opportunity analysis
  • C.economic feasibility analysis
  • D.risk analysis
查看答案
单选题

( )is a grid that shows the project resources assigned to each work package.

  • A.Stakeholder engagement assessment matrix
  • B.Requirements traceability matrix
  • C.Probability and impact matrix
  • D.Responsibility assignment matrix
查看答案
单选题

Xinhua News Agency reported in January 2022,Chian will further promote the developmet of a digital economy during the 14th Five-Year Plan eriod(2021-2025). The plan also emphasized industrial ( )transformation.

  • A.digital
  • B.networking
  • C.intelligentize
  • D.informatization
查看答案

相关题库更多 +