aboutsummaryrefslogtreecommitdiffstats
path: root/include/oauth.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-24 15:50:05 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-24 15:50:05 -0700
commit851f2f64df284d4ec410cdf7511b365db9fc5e9b (patch)
tree81484c475285226961b51240dd071197b7021791 /include/oauth.php
parent5795e2a58bb4a0702a3d318ec6ac05681d6e5864 (diff)
parent13546167877322afa274a2540656f525e55d3b48 (diff)
downloadvolse-hubzilla-851f2f64df284d4ec410cdf7511b365db9fc5e9b.tar.gz
volse-hubzilla-851f2f64df284d4ec410cdf7511b365db9fc5e9b.tar.bz2
volse-hubzilla-851f2f64df284d4ec410cdf7511b365db9fc5e9b.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: index.php mod/setup.php
Diffstat (limited to 'include/oauth.php')
-rw-r--r--include/oauth.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/oauth.php b/include/oauth.php
index ec754db95..a9509c68e 100644
--- a/include/oauth.php
+++ b/include/oauth.php
@@ -75,12 +75,12 @@ class FKOAuthDataStore extends OAuthDataStore {
$k = $consumer;
}
- $r = q("INSERT INTO tokens (id, secret, client_id, scope, expires) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP()+%d)",
+ $r = q("INSERT INTO tokens (id, secret, client_id, scope, expires) VALUES ('%s','%s','%s','%s', %d)",
dbesc($key),
dbesc($sec),
dbesc($k),
'request',
- intval(REQUEST_TOKEN_DURATION));
+ time()+intval(REQUEST_TOKEN_DURATION));
if (!$r) return null;
return new OAuthToken($key,$sec);
@@ -104,12 +104,12 @@ class FKOAuthDataStore extends OAuthDataStore {
$key = $this->gen_token();
$sec = $this->gen_token();
- $r = q("INSERT INTO tokens (id, secret, client_id, scope, expires, uid) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP()+%d, %d)",
+ $r = q("INSERT INTO tokens (id, secret, client_id, scope, expires, uid) VALUES ('%s','%s','%s','%s', %d, %d)",
dbesc($key),
dbesc($sec),
dbesc($consumer->key),
'access',
- intval(ACCESS_TOKEN_DURATION),
+ time()+intval(ACCESS_TOKEN_DURATION),
intval($uverifier));
if ($r)