Merge pull request 'master' (#5) from master into test
gitea/hedera-web/pipeline/head This commit looks good Details

Reviewed-on: #5
This commit is contained in:
Juan Ferrer 2022-05-20 13:02:23 +00:00
commit 3384170793
6 changed files with 7985 additions and 31 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.407.68) stable; urgency=low hedera-web (1.407.69) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -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, {

7998
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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": {

View File

@ -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

View File

@ -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)