Merge pull request 'master' (#5) from master into test
gitea/hedera-web/pipeline/head This commit looks good
Details
gitea/hedera-web/pipeline/head This commit looks good
Details
Reviewed-on: #5
This commit is contained in:
commit
3384170793
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (1.407.68) stable; urgency=low
|
hedera-web (1.407.69) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ Hedera.Invoices = new Class({
|
||||||
var params = {
|
var params = {
|
||||||
srv: 'rest:dms/invoice',
|
srv: 'rest:dms/invoice',
|
||||||
invoice: invoiceId,
|
invoice: invoiceId,
|
||||||
token: this.conn.token
|
access_token: this.conn.token
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.assign(column, {
|
Object.assign(column, {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "1.407.68",
|
"version": "1.407.69",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -81,7 +81,7 @@ class RestService extends Service {
|
||||||
http_response_code($status);
|
http_response_code($status);
|
||||||
}
|
}
|
||||||
|
|
||||||
function errorHandler($errno, $message, $file, $line, $context) {
|
function errorHandler($errno, $message, $file, $line, $context = NULL) {
|
||||||
$eFlag =
|
$eFlag =
|
||||||
E_USER_NOTICE
|
E_USER_NOTICE
|
||||||
| E_USER_WARNING
|
| E_USER_WARNING
|
||||||
|
|
|
@ -138,13 +138,19 @@ abstract class Service {
|
||||||
function login() {
|
function login() {
|
||||||
$db = $this->db;
|
$db = $this->db;
|
||||||
$anonymousUser = TRUE;
|
$anonymousUser = TRUE;
|
||||||
|
$token = NULL;
|
||||||
|
|
||||||
if (!empty($_SERVER['HTTP_AUTHORIZATION'])) {
|
if (!empty($_SERVER['HTTP_AUTHORIZATION']))
|
||||||
|
$token = $_SERVER['HTTP_AUTHORIZATION'];
|
||||||
|
if (!empty($_GET['access_token']))
|
||||||
|
$token = $_GET['access_token'];
|
||||||
|
|
||||||
|
if (isset($token)) {
|
||||||
$userId = $db->getValue(
|
$userId = $db->getValue(
|
||||||
'SELECT userId FROM salix.AccessToken
|
'SELECT userId FROM salix.AccessToken
|
||||||
WHERE id = #
|
WHERE id = #
|
||||||
AND NOW() <= TIMESTAMPADD(SECOND, ttl, created)',
|
AND NOW() <= TIMESTAMPADD(SECOND, ttl, created)',
|
||||||
[$_SERVER['HTTP_AUTHORIZATION']]
|
[$token]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!$userId)
|
if (!$userId)
|
||||||
|
|
Loading…
Reference in New Issue