docker-registry-ui icon indicating copy to clipboard operation
docker-registry-ui copied to clipboard

Illegal character in registry password

Open JamesStewy opened this issue 10 years ago • 3 comments

Hi. When I was trying to set up a registry upon hitting update the following error message was displayed:

URI /registry/show/1 Class java.net.URISyntaxException Message Illegal character in authority at index 8: https://user:[email protected]:443/v1/_ping

Line | Method ->> 2829 | fail in java.net.URI$Parser | 3167 | parseAuthority in '' | 3078 | parseHierarchical in '' | 3034 | parse in '' | 595 | . . . . . in java.net.URI | 92 | convertToURI in groovyx.net.http.URIBuilder | 789 | setUri . . . . . in groovyx.net.http.HTTPBuilder | 219 | in '' | 123 | $tt__ping . . . . in docker.registry.web.RepositoryService | 35 | ping in docker.registry.web.Registry | 19 | $tt__show . . . . in docker.registry.web.RegistryController | 198 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter | 63 | doFilter . . . . in grails.plugin.cache.web.filter.AbstractFilter | 53 | doFilter in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter | 49 | doFilter . . . . in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter | 82 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter | 1145 | runWorker . . . . in java.util.concurrent.ThreadPoolExecutor | 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker ^ 745 | run . . . . . . . in java.lang.Thread

The only thing I could possibly see the issue to be is that the password contains the %60 (Grave accent) character. Everything else is just letters and numbers. Thanks.

JamesStewy avatar Nov 30 '14 10:11 JamesStewy

Is it a valid character for URLs?

atcol avatar Nov 30 '14 10:11 atcol

I think it would be converted to its url encoded form %60.

EDIT: when I paste the url from the error (https://user:[email protected]:443/v1/_ping) into Chrome it successfully logs in and displays the ping message. However, it is unclear what chrome does with the invalid character as the url is immediately changed in the navigation bar to https://mydomain.com/v1/_ping.

JamesStewy avatar Nov 30 '14 10:11 JamesStewy

Bump

Could you escape the urls please? I have got the same error. I suspect that the reason is a character '}' in the password!

Message
    Illegal character in authority at index 7: http://user123:QwEr}[email protected]:1234/v2/_ping

Trace

    Line | Method
->> 2822 | fail              in java.net.URI$Parser
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   3160 | parseAuthority    in     ''
|   3071 | parseHierarchical in     ''
|   3027 | parse             in     ''
|    588 | <init> . . . . .  in java.net.URI
|     92 | convertToURI      in groovyx.net.http.URIBuilder
|    789 | setUri . . . . .  in groovyx.net.http.HTTPBuilder
|    219 | <init>            in     ''
|    129 | $tt__ping . . . . in docker.registry.web.RepositoryService
|     35 | ping              in docker.registry.web.Registry
|     19 | $tt__show . . . . in docker.registry.web.RegistryController
|    198 | doFilter          in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter . . . .  in grails.plugin.cache.web.filter.AbstractFilter
|     53 | doFilter          in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
|     49 | doFilter . . . .  in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
|     82 | doFilter          in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
|   1152 | runWorker . . . . in java.util.concurrent.ThreadPoolExecutor
|    622 | run               in java.util.concurrent.ThreadPoolExecutor$Worker
^    748 | run . . . . . . . in java.lang.Thread

UPD. I use substitution '%7D' instead '}'

antmak avatar Feb 07 '18 08:02 antmak