CodeChecker-Action icon indicating copy to clipboard operation
CodeChecker-Action copied to clipboard

Use an appropriate *server* URL in the generated authentication file instead of a *product* URL

Open whisperity opened this issue 2 years ago • 1 comments

As reported by @RobertoFioravanti in Ericsson/CodeChecker#4025, the automatically generated .codechecker.passwords.json contains the raw product URL instead of a server URL and this makes the action rely on undocumented happenstance in CodeChecker to be able to log in:

https://github.com/whisperity/CodeChecker-Action/blob/c1fbda08799d91447c007e18db31e423ee37fccd/src/store-pre.sh#L17

whisperity avatar Sep 29 '23 08:09 whisperity

It seems to work correctly by applying this regex to "$IN_STORE_URL" in store-pre.sh: ^((https?:\/\/)?([^\/]+)([\/].+))\/([^\/]+)$:

  • The server url is given by "${BASH_REMATCH[1]}".
  • The product is given by "${BASH_REMATCH[5]}"}.

Credentials wold become "${BASH_REMATCH[1]}": "$IN_STORE_USERNAME:$IN_STORE_PASSWORD".

RobertoFioravanti avatar Oct 03 '23 07:10 RobertoFioravanti