Hi all, I'm running my wordpress site behind a proxy and ran into this issue when managing galleries. If I have more than one page of images, clicking on the 'next page' buttons ('>' or '>>') would just send me to a login screen. I finally figured out that the problem was that the URL being formed was not the proxy URL.
I made the following changes on line 591 of admin/manage.php:
//$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $current_url = $_SERVER['REQUEST_URI'];
So now, instead of forcing a protocol and hostname, it uses the same one that was used to generate the existing page.