Conversation
Editing Travels and Bookings should work, Supplements tbd
... as cds-exported API packages now do that in a plug & play fashion
| const hana2hana = { | ||
| name: 'xflights', | ||
| adapter: 'hanaodbc', | ||
| configuration: `Driver=libodbcHDB.so;ServerNode=${xflights.credentials.host}:${xflights.credentials.port.replace('00', '00') /* hxe internal port is 39041 */};trustall=TRUE;encrypt=TRUE;sslValidateCertificate=FALSE`, |
Check warning
Code scanning / CodeQL
Replacement of a substring with itself Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 months ago
To fix this issue, the replacement should reflect the intended port transformation. The comment states "hxe internal port is 39041", while the credentials have "port": "30041". Therefore, the code should convert "30041" to "39041" in the DSN string. Usually, this just means replacing the starting "30" with "39". To do this robustly, use .replace(/^30/, '39'), which replaces the leading "30" only.
Edit only line 51 in test/hana.mjs, changing .replace('00', '00') to .replace(/^30/, '39').
No imports or other definitions are needed, just this code edit.
| @@ -48,7 +48,7 @@ | ||
| const hana2hana = { | ||
| name: 'xflights', | ||
| adapter: 'hanaodbc', | ||
| configuration: `Driver=libodbcHDB.so;ServerNode=${xflights.credentials.host}:${xflights.credentials.port.replace('00', '00') /* hxe internal port is 39041 */};trustall=TRUE;encrypt=TRUE;sslValidateCertificate=FALSE`, | ||
| configuration: `Driver=libodbcHDB.so;ServerNode=${xflights.credentials.host}:${xflights.credentials.port.replace(/^30/, '39') /* hxe internal port is 39041 */};trustall=TRUE;encrypt=TRUE;sslValidateCertificate=FALSE`, | ||
| credential: `user=${xflights.credentials.user};password=${xflights.credentials.password}`, | ||
| } | ||
|
|
No description provided.