Coder Social home page Coder Social logo

使用forward转跳BUG about yaf HOT 5 CLOSED

laruence avatar laruence commented on July 17, 2024
使用forward转跳BUG

from yaf.

Comments (5)

laruence avatar laruence commented on July 17, 2024

你forward以后, 再原action直接return false(阻止渲染当前模板). 或者, 你再原action调用dispatcher->disableView()//关闭视图渲染, 然后再新的action再->enableView();

from yaf.

cq-z avatar cq-z commented on July 17, 2024

好的谢谢鸟哥!

from yaf.

zxcvdavid avatar zxcvdavid commented on July 17, 2024

一个问题:为什么我们不直接在forward的实现处默认强制跳转? 不这么做的原因是什么?按照一般人的思维都是希望能立马停止程序直接跳转的。

from yaf.

skaic avatar skaic commented on July 17, 2024

曾经因为这个 forward 引发一个血的教训。

是这样子的:
做的是一个管理后台,用户进来后先判断权限,对没权限的用户 forward 到报错页面。

然后呢,那时没了解到 forward 后还会继续执行后面的逻辑,
结果,这个后台就这样直接被人操控了
=。=||||

from yaf.

cq-z avatar cq-z commented on July 17, 2024

redirect能实现你想要的直接跳转,
redirect和forward 个人觉得不同业务逻辑有不同需求。

from yaf.

Related Issues (20)

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.