Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Html.AntiForgeryToken() writes nothing on second call #5005

@justdmitry

Description

@justdmitry

When having several forms in one Razor view - antiforgery token is written only to first one.

View:

<form id="form-one">
    @Html.AntiForgeryToken()
</form>
<form id="form-two">
    @Html.AntiForgeryToken()
</form>

Generated html:

<form id="form-one">
    <input name="__RequestVerificationToken" type="hidden" value="CfDJ8..." />
</form>
<form id="form-two">

</form>

But second form should (expected) also include hidden input with (same?) token!

Checked on 1.0.0 RTM bits.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions