Skip to content

Commit 2b696a9

Browse files
committed
Merge remote-tracking branch 'origin/next' into ZMS-3519-clusteransicht-sortierung-uhrzeit
2 parents cfff729 + ee28a78 commit 2b696a9

File tree

6 files changed

+136
-131
lines changed

6 files changed

+136
-131
lines changed

zmsadmin/templates/block/emergency/emergency.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
data-state="clear"
88
data-source="">
99
<h2 class="aural">Notruf</h2>
10+
{% if workstation.name %}
1011
<button class="button button--emergency emergency__button-trigger" >
1112
<i class="fas fa-bell" aria-hidden="true"></i> NOTRUF
1213
</button>
13-
14+
{% endif %}
1415
<div class="emergency__overlay">
1516
<div class="block emergency__overlay-layout" role="dialog" aria-labelledby="emergency__overlay_title">
1617
{% embed "block/scaffholding/board.twig" with {'class': "emergency__display-box"} %} {# do NOT use class exception here! #}

zmsadmin/templates/block/process/info.twig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@
6060
</dl>
6161
<a class="button button--positive button--fullwidth button-finish right" href="{{ urlGet("workstationProcessFinished", {}, {}) }}" style="margin: 0.5em 0;">Fertig stellen</a>
6262

63-
{% if workstation.process.withAppointment %}
64-
<a class="button button--default button--fullwidth button-finish right" href="{{ urlGet("workstationProcessRedirect", {}, {}) }}" style="margin: 0.5em 0;">Weiterleiten</a>
65-
{% endif %}
66-
<button
63+
<a class="button button--default button--fullwidth button-finish right" href="{{ urlGet("workstationProcessRedirect", {}, {}) }}" style="margin: 0.5em 0;">Weiterleiten</a>
64+
<button
6765
type="button"
6866
class="button button--fullwidth client-called_button-parked left"
6967
style="margin: 0.5em 0; background-color: #edc00f; border-color: #edc00f !important;"

zmsapi/src/Zmsapi/ProcessRedirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function readResponse(
5454
$newProcess = (new \BO\Zmsdb\Process())->redirectToScope(
5555
$newProcess,
5656
$process->scope,
57-
$process->id,
57+
$process->queue['number'] ?? $process->id,
5858
$workstation->getUseraccount()
5959
);
6060

zmscalldisplay/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zmsslim/src/Slim/Middleware/OAuth/KeycloakInstance.php

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ private function testAccess(AccessToken $token)
101101
'event' => 'oauth_token_validation',
102102
'timestamp' => date('c')
103103
]);
104-
104+
105105
list($header, $payload, $signature) = explode('.', $token->getToken());
106-
106+
107107
if (empty($header)) {
108108
$this->logger->error('Token validation failed', [
109109
'event' => 'oauth_token_validation_failed',
@@ -128,11 +128,16 @@ private function testAccess(AccessToken $token)
128128
]);
129129
throw new \BO\Slim\Exception\OAuthFailed();
130130
}
131-
131+
132132
$realmData = $this->provider->getBasicOptionsFromJsonFile();
133-
$accessTokenPayload = json_decode(base64_decode($payload), true);
133+
134+
// Fix: Properly handle base64url encoding before JSON decoding
135+
$payload = str_replace(['-', '_'], ['+', '/'], $payload);
136+
$payload = base64_decode($payload . str_repeat('=', 4 - (strlen($payload) % 4)));
137+
$accessTokenPayload = json_decode($payload, true);
138+
134139
$clientRoles = array();
135-
140+
136141
if ($accessTokenPayload === null) {
137142
$this->logger->error('Token validation failed', [
138143
'event' => 'oauth_token_validation_failed',
@@ -142,7 +147,7 @@ private function testAccess(AccessToken $token)
142147
]);
143148
throw new \BO\Slim\Exception\OAuthFailed();
144149
}
145-
150+
146151
if (!isset($accessTokenPayload['resource_access']) || !is_array($accessTokenPayload['resource_access'])) {
147152
$this->logger->error('Token validation failed', [
148153
'event' => 'oauth_token_validation_failed',
@@ -153,7 +158,7 @@ private function testAccess(AccessToken $token)
153158
]);
154159
throw new \BO\Slim\Exception\OAuthFailed();
155160
}
156-
161+
157162
if (!isset($accessTokenPayload['resource_access'][\App::IDENTIFIER])) {
158163
$this->logger->error('Token validation failed', [
159164
'event' => 'oauth_token_validation_failed',
@@ -164,10 +169,10 @@ private function testAccess(AccessToken $token)
164169
]);
165170
throw new \BO\Slim\Exception\OAuthFailed();
166171
}
167-
172+
168173
$resourceAccess = $accessTokenPayload['resource_access'];
169174
$appIdentifierRoles = $resourceAccess[\App::IDENTIFIER]['roles'] ?? null;
170-
175+
171176
if (!$appIdentifierRoles || !is_array($appIdentifierRoles)) {
172177
$this->logger->error('Token validation failed', [
173178
'event' => 'oauth_token_validation_failed',
@@ -178,7 +183,7 @@ private function testAccess(AccessToken $token)
178183
]);
179184
throw new \BO\Slim\Exception\OAuthFailed();
180185
}
181-
186+
182187
if (is_array($accessTokenPayload['resource_access'])) {
183188
$clientRoles = array_values($accessTokenPayload['resource_access'][\App::IDENTIFIER]['roles']);
184189
}
@@ -193,7 +198,7 @@ private function testAccess(AccessToken $token)
193198
]);
194199
throw new \BO\Slim\Exception\OAuthFailed();
195200
}
196-
201+
197202
\App::$log->info('Token validation successful', [
198203
'event' => 'oauth_token_validation_success',
199204
'timestamp' => date('c')

0 commit comments

Comments
 (0)