Skip to content
This repository
Browse code

Safer pin matching

  • Loading branch information...
commit 409a2fa2961ea088573e95724dab269a820b0bdc 1 parent 1db3b93
Cezar Sá Espinola authored June 27, 2012

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  lib/oauth_authorizer.js
6  lib/oauth_authorizer.js
@@ -3,6 +3,12 @@ function getAuthPin() {
3 3
     var fullText = $("#bd").text();
4 4
     if((fullText.match(/chromed bird/i) || fullText.match(/silver bird/i)) && !fullText.match(/denied/i)) {
5 5
       var pin = $.trim($("code").text());
  6
+      if (!pin) {
  7
+        return;
  8
+      }
  9
+      if (pin.length < 6) {
  10
+        return;
  11
+      }
6 12
 
7 13
       var oauthMessageArea = $("#oauth_pin p");
8 14
       oauthMessageArea.css({

0 notes on commit 409a2fa

Please sign in to comment.
Something went wrong with that request. Please try again.