File tree 2 files changed +15
-4
lines changed
modules/os2forms_nemid/src/Service
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ before starting to add changes. Use example [placed in the end of the page](#exa
11
11
12
12
## [ Unreleased]
13
13
14
+ ## [ 3.20.1] 2024-12-10
15
+
16
+ - Avoided accessing non-initialized property when logging in ` os2forms_nemid ` .
17
+
14
18
## [ 3.20.0] 2024-12-09
15
19
16
20
- Added webform ID to digital post audit logging messages.
@@ -314,7 +318,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa
314
318
- Security in case of vulnerabilities.
315
319
```
316
320
317
- [ Unreleased ] : https://github.com/OS2Forms/os2forms/compare/3.20.0...HEAD
321
+ [ Unreleased ] : https://github.com/OS2Forms/os2forms/compare/3.20.1...HEAD
322
+ [ 3.20.1 ] : https://github.com/OS2Forms/os2forms/compare/3.20.0...3.20.1
318
323
[ 3.20.0 ] : https://github.com/OS2Forms/os2forms/compare/3.19.0...3.20.0
319
324
[ 3.19.0 ] : https://github.com/OS2Forms/os2forms/compare/3.18.0...3.19.0
320
325
[ 3.18.0 ] : https://github.com/OS2Forms/os2forms/compare/3.17.0...3.18.0
Original file line number Diff line number Diff line change @@ -147,9 +147,15 @@ public function retrieveCprLookupResult(FormStateInterface $form_state) {
147
147
$ authProviderPlugin = $ this ->getAuthProvider ($ form_state );
148
148
149
149
$ userCpr = $ authProviderPlugin ->fetchValue ('cpr ' );
150
- $ lookedUpCpr = $ cprLookupResult ->getCpr ();
151
-
152
- $ this ->auditLogger ->info ('DataLookup ' , 'User with cpr ' . $ userCpr . ' looked up cpr ' . $ lookedUpCpr );
150
+ $ lookedUpCpr = $ cprLookupResult ->getFieldValue ('cpr ' );
151
+
152
+ // Current method is called whenever the webform is rendered.
153
+ // As a result, it is also called in situations where both
154
+ // userCpr and lookedUpCpr does not make sense, e.g.
155
+ // adding an element to a webform.
156
+ if ($ userCpr && $ lookedUpCpr ) {
157
+ $ this ->auditLogger ->info ('DataLookup ' , 'User with cpr ' . $ userCpr . ' looked up cpr ' . $ lookedUpCpr );
158
+ }
153
159
154
160
return $ cprLookupResult ;
155
161
}
You can’t perform that action at this time.
0 commit comments