Issue #4220 resolved

403 error for images in private wikis (BB-4537)

Billy Bednar
created an issue

Images (and other non-.wiki content) are not accessible in private wikis via custom domains (CNAME). To reproduce push an image and view in a browser using your domain name. When the wiki is private the server returns a 403 forbidden response for images. Changing the wiki to public or accessing the page via bitbucket.org will cause the image to be displayed.

Comments (8)

  1. Marcus Bertrand staff

    I'm unable to reproduce this behavior. Please raise a support request to support@bitbucket.org with a link to the wiki page with the issue. --Marcus / Bitbucket Support

  2. Billy Bednar reporter

    I took another look today and it appears that this is only a problem when accessing the wiki using a custom domain. Accessing it via bitbucket.org works as expected.

  3. Billy Bednar reporter

    The image is in the root of the wiki (http://git.billysoft.net/wikitest/wiki/usb.jpg) and is embedded in the wiki home page. The wiki is currently public but if you toggle the wiki setting between public and private the image will go from working to a 403 error. I can add you as an admin if you'd like to try it.

    Accessing the image via https://bitbucket.org/bednar/wikitest/wiki/usb.jpg always seems to work. You are redirected to https://bytebucket.org/bednar/wikitest/wiki/usb.jpg when the wiki is public and to https://bytebucket.org/bednar/wikitest/wiki/usb.jpg?token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX when it is private. Accessing the image with the custom domain doesn't cause any similar redirects.

  4. Log in to comment