openSUSE / open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
https://openbuildservice.org
GNU General Public License v2.0
931 stars 438 forks source link

OSC is returning internal URLs in error messages #9403

Open SchoolGuy opened 4 years ago

SchoolGuy commented 4 years ago

While working on a package in my home-project I accidentally misconfigured my service file which lead to an error. Apparently the client leaks in it's error message internal (for a user not reachable) URLs. Example can be seen below.

Output of osc --version: 0.168.2

> osc -A https://api.opensuse.org build --clean
Building onedrive.spec for openSUSE_Tumbleweed/x86_64
Getting buildconfig from server and store to /home/enno/Sources/External_Build_Service/home:SchoolGuy:branches:home:bmanojlovic:onedrive/onedrive/.osc/_buildconfig-openSUSE_Tumbleweed-x86_64
Getting buildinfo from server and store to /home/enno/Sources/External_Build_Service/home:SchoolGuy:branches:home:bmanojlovic:onedrive/onedrive/.osc/_buildinfo-openSUSE_Tumbleweed-x86_64.xml
Server returned an error: HTTP Error 400: Bad Request
remote error: element 'services' contains content (http://back-home-opensuse:5252/build/home:SchoolGuy:branches:home:bmanojlovic:onedrive/openSUSE_Tumbleweed/x86_64/onedrive/_buildinfo?add=gdb&add=vim&add=strace&add=less&add=rzsz)
marcus-h commented 4 years ago

On 2020-04-16 02:00:37 -0700, Enno G. wrote:

> osc -A https://api.opensuse.org build --clean
Building onedrive.spec for openSUSE_Tumbleweed/x86_64
Getting buildconfig from server and store to /home/enno/Sources/External_Build_Service/home:SchoolGuy:branches:home:bmanojlovic:onedrive/onedrive/.osc/_buildconfig-openSUSE_Tumbleweed-x86_64
Getting buildinfo from server and store to /home/enno/Sources/External_Build_Service/home:SchoolGuy:branches:home:bmanojlovic:onedrive/onedrive/.osc/_buildinfo-openSUSE_Tumbleweed-x86_64.xml
Server returned an error: HTTP Error 400: Bad Request
remote error: element 'services' contains content (http://back-home-opensuse:5252/build/home:SchoolGuy:branches:home:bmanojlovic:onedrive/openSUSE_Tumbleweed/x86_64/onedrive/_buildinfo?add=gdb&add=vim&add=strace&add=less&add=rzsz)

That's not an osc issue. From a quick glance, it seems to be related to commit 26fe5cab532e34e92ecec1e31a4a14c859cc1e48 ("[backend] added uri to 'remote error' message") (which is part of the open-build-service repo).

SchoolGuy commented 4 years ago

@adrianschroeter Could you then possibly transfer this issue to the obs repo? I guess this kind of information should not be leaked to the outside.

lethliel commented 4 years ago

I am not Adrian, but I transferred the issue

SchoolGuy commented 4 years ago

@lethliel Fine with me as well :D, just knew that Adrian should have the rights...