Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1435 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

[PATCH] Login.kid doesn't honor multiple inputs with same name

Reported by: eduardo.rocha Owned by: roger.demetrescu
Priority: normal Milestone: 1.0.4
Component: tg-admin (non-toolbox) Version: 1.0.2
Severity: normal Keywords:
Cc:

Description

I have some forms with inputs that have repeated name, like:

<input type="text" name="foo" value="my foo">
<input type="text" name="bar" value="bar 1">
<input type="text" name="bar" value="bar 2">
<input type="text" name="bar" value="bar 3">

As expected, the controller receives the 'bar' parameter in a list structure. However, if my controller/method is protected by @identity, and the login.kid is displayed, the generated 'input hidden' is modified in a matter that, when login is accomplished, my controller doesn't receive the 'bar' in a list, but rather in a string with all values concatenated.:

<input type="hidden" name="foo" value="my foo">
<input type="hidden" name="bar" value="bar 1bar 2bar 3">

So this little patch fixes this issue, generating the hidden fields the right way (following my example, 4 hidden fields).

Thanks

Eduardo Rocha

PS: I wasn't sure if this is part of "Identity" component, since it relates to a template of login.kid, used by "tg-admin quickstart"

Attachments

login.patch Download (829 bytes) - added by eduardo.rocha 12 years ago.

Change History

Changed 12 years ago by eduardo.rocha

comment:1 Changed 12 years ago by faide

  • Owner changed from anonymous to faide

comment:2 Changed 12 years ago by faide

  • Status changed from new to assigned

comment:3 Changed 12 years ago by faide

I need to do some small tests because I adapted it also to work in 1.1 but this should go in rapidly.

Thanks for the patch!

comment:4 Changed 12 years ago by eduardo.rocha

Thanks. :)

BTW, maybe it should be a good idea to adapt the patch against gsquickstart too (I dunno who is the maintainer)...

comment:5 Changed 12 years ago by faide

Well I'll see If I can do that also...

comment:6 Changed 12 years ago by eduardo.rocha

Thanks Florent, :)

I appreciate your work...

Cheers,

Eduardo

comment:7 Changed 12 years ago by Chris Arndt

  • Milestone changed from 1.0.3 to 1.0.4

Batch promoting 1.0.3 tickets to Milestone 1.0.4

comment:8 Changed 12 years ago by roger.demetrescu

  • Owner changed from faide to roger.demetrescu
  • Status changed from assigned to new

comment:9 Changed 12 years ago by roger.demetrescu

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [3288], [3289], [3520] and [3521]. Thanks !

Note: See TracTickets for help on using tickets.