Code Monkey home page Code Monkey logo

Comments (5)

stevenyangecho avatar stevenyangecho commented on May 4, 2024

https://github.com/LaravelCollective/html/blob/623a150c91e2d3f92eeee9f9eda58a841e3cb548/src/FormBuilder.php#L225
$token = ! empty($this->csrfToken) ? $this->csrfToken : $this->session->token();
问题似乎出在这里,这个 $this->csrfToken 会保存..改成直接都每次取的话,就没问题了 $this->session->token()

有从laravels方面解决的方案没

from laravel-s.

hhxsv5 avatar hhxsv5 commented on May 4, 2024

我测试下。

from laravel-s.

hhxsv5 avatar hhxsv5 commented on May 4, 2024

基于Laravel5.1+LaravelCollective/html 5.1测试,没有复现。

{!! Form::open(['method' => 'POST']) !!}
{{ csrf_token() }}
<form method="POST" action="http://127.0.0.1:8011/test-html" accept-charset="UTF-8"><input name="_token" type="hidden" value="0ik8r8ZbymT6HXk3QQHSKhwrqNpOQYEMCcNbpT3F">
0ik8r8ZbymT6HXk3QQHSKhwrqNpOQYEMCcNbpT3F

提供下一个精简可重现的例子。

from laravel-s.

stevenyangecho avatar stevenyangecho commented on May 4, 2024

是由于单例的关系,得模拟不同用户来测试
#25 应该是一个问题
看到最近有修复,Save snapshots for members of $app,应该能解决这个问题,应该是很重要的修复,有没有相关文档呢?

from laravel-s.

hhxsv5 avatar hhxsv5 commented on May 4, 2024

#25 是保存了初始化Laravel时$app的一些成员属性,每次请求时重新覆盖到$app,目前只有configcookie,应该不影响session。这是底层支持,上层无需关注。你现在还能重现吗?

from laravel-s.

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.