Git Product home page Git Product logo

browserid-wordpress's People

Contributors

denismalofeyev avatar jasondmoss avatar jerrykan avatar jonchang avatar krydos avatar magicfab avatar makotokato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

browserid-wordpress's Issues

siteLogo issues

I set a site logo to
https://ozten.com/i/avatar.jpg

This doesn't work for several reasons.

wp_localize_script changes this value to https:\/\/ozten.com\/i\/avatar.jpg which blows up in Persona.

So I hacked login.js to replace('\\', '').

Now I see watch being called with https://ozten.com/i/avatar.jpg, but oddly the dialog still dies with

$.fn.live breaks sites using jQuery 1.9+

This line https://github.com/shane-tomlinson/browserid-wordpress/blob/master/login.js#L39 should use delegate, instead of live. delegate was added in jQuery 1.4.2, and still exists in jQuery 2.0.3.

In order to continue support for jQuery 1.3 (the version that introduced .live) something like this should work:

var logOutHandle = function(event) { /*...*/ },
     logOutSelector = ".js-persona__logout";

if ( typeof $.fn.delegate === "function" ) {
    $("body").delegate(logOutSelector, "click", logOutHandle);
}
else {
    $(logOutSelector).live("click", logOutHandle);        
}

Remove one of the *.pot file

We have two similar *.pot files into project.

browserid.pot - into root directory of Persona plugin.
browserid.pot - into "locale" directory.

I could be wrong of course but I think that one of them is excess. I'm right? if yes, lets remove one of them :)

v 0.43 Redirect loop when working with multiple domains

In our WordPress setup we carry out all admin tasks on a different subdomain to the main site. I.e. WordPress admin pages are served from admin.examplenameofsite.com whereas the frontend is viewed through www.examplenameofsite.com (this allows all admin work to be served from a single server with the front end load balanced across multiple servers).

With v 0.43 we were experiencing a redirect loop whereby trying to view the front end pages after logging in redirected the user back to the admin dashboard, making the site unusable for logged in users. I.e. this happened:

User logs in to admin.examplenameofsite.com/wp-admin
User tries to visit www.examplenameofsite.com/
User is redirected to admin.examplenameofsite.com/wp-admin

This is caused by the assertion check running on every page, and redirecting the user back to the dashboard (this may also have been the cause of other performance problems). I fixed it by checking if the user was already logged in, and skipping the assertion check if so:

--- browserid.php       (origina in v 0.43l)
+++ browserid.php       (my working copy)
@@ -164,11 +164,14 @@
                        // I18n
                        load_plugin_textdomain(c_bid_text_domain, false, dirname(plugin_basename(__FILE__)));

-                       // Check for assertion
+                       // If not already logged in, Check for assertion
+
+                       if(!is_user_logged_in()){
                        $assertion = self::Get_assertion();
                        if (!empty($assertion)) {
                                self::Check_assertion($assertion);
                        }
+                       }

                        // Enqueue BrowserID scripts
                        wp_register_script('browserid', 'https://login.persona.org/include.js', array(), '', true);

I guess the downside is that the user will not be auto-logged out if they log out of Persona, but for us that's a minor issue and I'd rather not have the overhead of checking on every page load anyway

With non-Persona logins disabled, adding a user is impossible due to missing password fields

Version 0.44

Steps to reproduce

Set "Disable non-Persona logins" in the WP plugin
Go to the "User" menu and click "Add new"
Fill in a "username" and "email"
Notice that you can't fill in a password since the plugin removes these fields
Click "Add new"

Expected results

The new user is added, perhaps with an empty password or randomly generated password

Actual results

The error message "ERROR: Please enter your password." is shown

Workaround

Temporarily re-enable non-persona logins on the live site (ugh), create the user giving them a random password, then re-disable non-persona logins after.

Creates a pile of php errors

We used this plugin on the nightingale blog. However with the 0.40 update it broke for us. It is pretty impossible to login without persona. Also you get these php errors while logged in. You can simply press back and are back on the page you wanted to go, but it still sucks.

Usability: confusing placement of login button on wp-admin

At the wp-admin login page, the Persona button is located between the normal login (email + password) form and the normal login button. This seems rather confusing and doesn't help clearly distinguish the Persona login button from the other button - in fact it shows 2 buttons, given the impression the submit button for Persona will submit the normal login fields for authentication.

It should be located either at the top or at the bottom

This is even more confusing when other authentication plugins are enabled, such as Google Authenticator.

feature: sign in without having to have a word press account

The biggest hurdle of getting more wide spread adoption of this plugin is the fact that you have to have an existing word press username to sign in via persona. I want any user with a persona acct to be able to sign in and make a comment.

user story:
I don't have a word press user name, and stumble on a blog. I want to comment. I click sign in with persona. I use my [email protected] to authenticate. I make comment successfully.

Currently, I just get a non-descriptive error if i don't have a word press sign in.

strict warnings when PHP is in strict mode

Strict Standards: Non-static method MozillaBrowserID::Get_loginout_html() should not be called statically, assuming $this from incompatible context in /Users/stomlinson/development/wordpress/wp-content/plugins/browserid/browserid.php on line 1140

Link to "What is Persona" doesn't go to the corresponding language page at m.o

When logged out, having comments login support enabled in the plugin, the persona logo is shown with an accompanying link "What is persona?" which goes to https://login.persona.org/. It seems instead it should go to the corresponding URI in the appropriate language. It doesn't help that login.p.o does not have a language switcher, I assume it does browser detection.

When using a localized version of WordPress, the link is always the same despite there existing localized versions:
French: https://support.mozilla.org/fr/kb/quest-persona-comment-ca-marche
Spanish: https://support.mozilla.org/es/kb/que-es-y-como-funciona-mozilla-persona
etc.

The URL should be in the language file for proper language support - but putting it there would hardcode it.

logout link from Wordpress Dashboard - infinite loop

Steps to Reproduce

  1. go to example.com/wp-admin/
  2. sign in
  3. On dashboard in upper right, hover over profile and click logout

Expected
You are logged out and put on the sign in form

Actual
You are put onto the sign in form. Then the page redirect to the dashboard and you appear to be signed in. Then the page keeps refreshing every second.

Site name cannot contain an apostrophe

As reported by musicisair in http://wordpress.org/support/topic/site-name-cannot-contain-an-apostrophe?replies=1

function Option_sitename needs to escape $options['browserid_sitename'] with htmlspecialcharacters.

The new function should look like this:

// Site name option
        function Option_sitename() {
            $options = get_option('browserid_options');
            if (empty($options['browserid_sitename']))
                $options['browserid_sitename'] = null;
            echo "<input id='browserid_sitename' name='browserid_options[browserid_sitename]' type='text' size='100' value='" . htmlspecialcharacters( $options['browserid_sitename'] ) . "' />";
            echo '' . __('Default the WordPress site name', c_bid_text_domain);
        }

Error after update to 0.40: Missing argument 2 for MozillaBrowserID::Set_auth_cookie_action()

After I updated this plugin in my Wordpress instance (previously logged in with Persona), every time I open a page the site loads normally but then redirects to my homepage and shows these error:

Warning: Missing argument 2 for MozillaBrowserID::Set_auth_cookie_action() in /route_to_wp/wp-content/plugins/browserid/browserid.php on line 512

Warning: Missing argument 3 for MozillaBrowserID::Set_auth_cookie_action() in /route_to_wp/wp-content/plugins/browserid/browserid.php on line 512

Warning: Missing argument 4 for MozillaBrowserID::Set_auth_cookie_action() in /route_to_wp/wp-content/plugins/browserid/browserid.php on line 512

Warning: Missing argument 5 for MozillaBrowserID::Set_auth_cookie_action() in /route_to_wp/wp-content/plugins/browserid/browserid.php on line 512

Warning: Cannot modify header information - headers already sent by (output started at /route_to_wp/wp-content/plugins/browserid/browserid.php:512) in /route_to_wp/wp-content/plugins/browserid/browserid.php on line 518

Warning: Cannot modify header information - headers already sent by (output started at /route_to_wp/wp-content/plugins/browserid/browserid.php:512) in /route_to_wp/wp-includes/pluggable.php on line 680

Warning: Cannot modify header information - headers already sent by (output started at /route_to_wp/wp-content/plugins/browserid/browserid.php:512) in /route_to_wp/wp-includes/pluggable.php on line 681

Warning: Cannot modify header information - headers already sent by (output started at /route_to_wp/wp-content/plugins/browserid/browserid.php:512) in /route_to_wp/wp-includes/pluggable.php on line 682

Warning: Cannot modify header information - headers already sent by (output started at /route_to_wp/wp-content/plugins/browserid/browserid.php:512) in /route_to_wp/wp-includes/pluggable.php on line 876

The issue only appears when the plugin is active. I deactivated it, deleted it and then reinstalled it (from Wordpress search and download/upload) but the error reappears.

I had to search the SVN repository, download the 0.36 version and upload it to my Wordpress. The error didn't return.

I noticed also that the options in the page for plugins details (0.4) are empty.

Major performance hit, even on non-admin/login pages.

P3 Plugin Performance Profiler shows that Persona accounts for 50% of the runtime, even when I restrict the test session to non wp-admin pages!

To verify this result, I had WebPagetest average 10 tests with the Persona plugin enabled and again with the Persona plugin disabled (note that the "first load" test was only run once/is invalid as a measure). Turning Persona off shaved ~1.5 seconds from the time-to-first-byte, roughly matching the stats reported by P3.

Name is overwritten by Persona

If I type a name in the comment field, but post with Persona, the local part of my email address overwrites the name I typed in.

"Sign in with Persona" button should sign users in when posting comment.

this is an issue if you're on a shared or cafe computer

  1. comment on blog with persona
  2. try to log out

actual: There is no logout link. I can change my name but the blog admin sees all comments with the same persona email

expected: i would expect the 'sign in with email' to change to a logout button

The notice, if $options array have no needed index.

Ahhh. I am sorry about non informative title.

When I went to the Persona settings I got the notice about "Undefined index". I think this is because Persona plugin have no data into db about new fields "browserid_terms_of_service" and "browserid_privacy_policy".

This look like this:
screenshot at 2013-07-24 22 11 49

P.S. Looks so redly and huge because I use xdebug.

So I tryed to fix this. And I send pull request below.

A Persona button is not shown for comments.

Using WordPress 3.5.2.

I tested authentication for comments posting with the stable and dev versions, the Persona button doesn't show up with the dev version of the plugin, even if it's enabled in the options.

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.