Socket
Socket
Sign inDemoInstall

facebook-sdk

Package Overview
Dependencies
0
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

5

._package.json

@@ -1,4 +0,1 @@

Mac OS X  2��ATTR �j��#�#com.macromates.caret{
column = 22;
line = 16;
}
Mac OS X  2��ATTRFY{�� � com.macromates.caretx���R������<[k0?'3/«��

4

lib/facebook.js

@@ -91,2 +91,3 @@ var crypto = require('crypto'),

* - response: http.ServerResponse for writing the cookie to
* - siteUrl:
* - domain: (optional) domain for the cookie

@@ -218,3 +219,4 @@ * - fileUpload: (optional) boolean indicating if file uploads are enabled

if (cookies[cookieName]) {
session = querystring.parse(cookies[cookieName]);
var cookie = cookies[cookieName].replace(/^"*|"*$/g, '');
session = querystring.parse(cookie);
session = this._validateSessionObject(session);

@@ -221,0 +223,0 @@ // write only if we need to delete a invalid session cookie

@@ -5,3 +5,3 @@ {

"keywords": ["facebook", "sdk", "graph", "api", "connect", "canvas"],
"version": "0.2.0",
"version": "0.2.1",
"author": "Christopher Johnson <tenorviol@yahoo.com> (http://github.com/tenorviol)",

@@ -8,0 +8,0 @@ "repository" : {

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR �o��$�$com.macromates.caret{
column = 62;
line = 309;
Mac OS X  2��ATTRFY��$�$com.macromates.caret{
column = 11;
line = 166;
}

@@ -148,3 +148,3 @@ var fbsdk = require('../lib/facebook'),

setHeader: function(name, value) {
// copied from a php-sdk instance
// setting the session sets the cookie (copied from a php-sdk instance)
test.equal(name, 'Set-Cookie');

@@ -167,2 +167,20 @@ test.equal(value, 'fbs_117743971608120=%22access_token%3D117743971608120%257C2.vdCKd4ZIEJlHwwtrkilgKQ__.86400.1281049200-1677846385%257CNF_2DDNxFBznj2CuwiwabHhTAHc.%26expires%3D1281049200%26secret%3Du0QiRGAwaPCyQ7JE_hiz1w__%26session_key%3D2.vdCKd4ZIEJlHwwtrkilgKQ__.86400.1281049200-1677846385%26sig%3D7a9b063de0bef334637832166948dcad%26uid%3D1677846385%22; expires=Thu, 05 Aug 2010 23:00:00 GMT; path=/; domain=.foo.com');

exports.testGetSession = function(test) {
// regression test: the cookie we set should be getSession-able
var request = {
url: '/',
headers: {
// cookie copied from the above testSetSession
cookie: 'fbs_117743971608120=%22access_token%3D117743971608120%257C2.vdCKd4ZIEJlHwwtrkilgKQ__.86400.1281049200-1677846385%257CNF_2DDNxFBznj2CuwiwabHhTAHc.%26expires%3D1281049200%26secret%3Du0QiRGAwaPCyQ7JE_hiz1w__%26session_key%3D2.vdCKd4ZIEJlHwwtrkilgKQ__.86400.1281049200-1677846385%26sig%3D7a9b063de0bef334637832166948dcad%26uid%3D1677846385%22'
}
};
var facebook = new fbsdk.Facebook({
appId : APP_ID,
secret : SECRET,
request: request
});
test.deepEqual(facebook.getSession(), VALID_EXPIRED_SESSION);
test.done();
}
exports.testGetSessionFromCookie = function(test) {

@@ -169,0 +187,0 @@ var cookieName = 'fbs_' + APP_ID;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc