WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 months ago

#12657 closed defect (bug) (invalid)

wp_signon() adds one filter per call

Reported by: hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: General Keywords:
Focuses: Cc:

Description

If wp_signon() is called multiple times, the filter will be added multiple times. Next to this a lot of the function seems to be just typed in in the wish that it does work instead of doing things properly. See quote: "ugly hack to pass this to wp_authenticate_cookie" or leftover TODO markings and the like.

Should be put in order prior to next release.

Attachments (1)

clipboard.patch (876 bytes) - added by hakre 4 years ago.
Only use filter once

Download all attachments as: .zip

Change History (7)

comment:1 hakre4 years ago

Maybe some code example from that function (too much paranthesis and instructions):

( 0 !== strpos($redirect_to, 'https') ) && ( 0 === strpos($redirect_to, 'http') )

(taken from an if clause therein)

comment:2 hakre4 years ago

please delete my last comment, I wish I could do that.

comment:3 hakre4 years ago

Code in function wp_authenticate() might be related.

comment:4 nacin4 years ago

  • Milestone changed from 3.0 to Future Release

hakre4 years ago

Only use filter once

comment:5 hakre4 years ago

Technically this should not be necessary as the new callback would overwrite the previous one because the generate the same hook identification and therefore replace each other.

comment:6 nacin3 months ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

Adding a filter a second time does nothing, a simple overwrite occurs.

Note: See TracTickets for help on using tickets.