OpenID not working with wordpress

Bug #522560 reported by gimenete
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
Undecided
Unassigned
1.1
Fix Committed
Undecided
Unassigned

Bug Description

The current OpenID implementation does not work with wordpress.

The problem is in OpenID.java. The extractHref() method is called but it does not found the href attribute. The regular expression is:
 Matcher m = Pattern.compile("href=\"([^\"]*)\"").matcher(link);

But wordpress uses simple quotes ('). So the href is not extracted. Changing the regular expression should work. This is a quick fix that works:

    static String extractHref(String link) {
        Matcher m = Pattern.compile("href=\"([^\"]*)\"").matcher(link);
        if (m.find()) {
            return m.group(1).trim();
        }
        m = Pattern.compile("href=\'([^\']*)\'").matcher(link);
        if (m.find()) {
            return m.group(1).trim();
        }
        return null;
    }

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.