{"action":"created","comment":{"url":"https://api.github.com/repos/pac4j/pac4j/pulls/comments/48591632","id":48591632,"diff_hunk":"@@ -266,7 +266,7 @@ protected void initializeClientConfiguration() {\n             this.casPrefixUrl += \"/\";\n         }\n         if (CommonHelper.isBlank(this.casPrefixUrl)) {\n-            this.casPrefixUrl = this.casLoginUrl.replaceFirst(\"/login\", \"/\");\n+            this.casPrefixUrl = this.casLoginUrl.replaceFirst(\"/login$\", \"/$\");","path":"pac4j-cas/src/main/java/org/pac4j/cas/client/CasClient.java","position":5,"original_position":5,"commit_id":"c5ee3fe9c6ff383161a6fce1bf103a40e01bcfbe","original_commit_id":"c5ee3fe9c6ff383161a6fce1bf103a40e01bcfbe","user":{"login":"leleuj","id":1038508,"avatar_url":"https://avatars.githubusercontent.com/u/1038508?v=3","gravatar_id":"","url":"https://api.github.com/users/leleuj","html_url":"https://github.com/leleuj","followers_url":"https://api.github.com/users/leleuj/followers","following_url":"https://api.github.com/users/leleuj/following{/other_user}","gists_url":"https://api.github.com/users/leleuj/gists{/gist_id}","starred_url":"https://api.github.com/users/leleuj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leleuj/subscriptions","organizations_url":"https://api.github.com/users/leleuj/orgs","repos_url":"https://api.github.com/users/leleuj/repos","events_url":"https://api.github.com/users/leleuj/events{/privacy}","received_events_url":"https://api.github.com/users/leleuj/received_events","type":"User","site_admin":false},"body":"The `$` is not a required convention, it's part of the regexp which is the first parameter of the `replaceFirst` method.\r\n\r\n```\r\nString url1 = \"http://localhost:8080/cas/login\";\r\nSystem.out.println(url1.replaceFirst(\"/login$\", \"/end\"));\r\n```\r\nWill output: `http://localhost:8080/cas/end`.\r\n\r\nAnd it works for: `String url1 = \"http://loginserver/cas/login\";` which is the needed fix.\r\n\r\nThough, the proposed fix: `this.casPrefixUrl = this.casLoginUrl.replaceFirst(\"/login$\", \"/$\");` doesn't work and generates: `Illegal group reference: group index is missing`.\r\n","created_at":"2015-12-30T08:29:04Z","updated_at":"2015-12-30T08:29:04Z","html_url":"https://github.com/pac4j/pac4j/pull/421#discussion_r48591632","pull_request_url":"https://api.github.com/repos/pac4j/pac4j/pulls/421","_links":{"self":{"href":"https://api.github.com/repos/pac4j/pac4j/pulls/comments/48591632"},"html":{"href":"https://github.com/pac4j/pac4j/pull/421#discussion_r48591632"},"pull_request":{"href":"https://api.github.com/repos/pac4j/pac4j/pulls/421"}}},"pull_request":{"url":"https://api.github.com/repos/pac4j/pac4j/pulls/421","id":54726397,"html_url":"https://github.com/pac4j/pac4j/pull/421","diff_url":"https://github.com/pac4j/pac4j/pull/421.diff","patch_url":"https://github.com/pac4j/pac4j/pull/421.patch","issue_url":"https://api.github.com/repos/pac4j/pac4j/issues/421","number":421,"state":"open","locked":false,"title":"fix for FQDNs starting with \"login\"","user":{"login":"dkefer","id":13050398,"avatar_url":"https://avatars.githubusercontent.com/u/13050398?v=3","gravatar_id":"","url":"https://api.github.com/users/dkefer","html_url":"https://github.com/dkefer","followers_url":"https://api.github.com/users/dkefer/followers","following_url":"https://api.github.com/users/dkefer/following{/other_user}","gists_url":"https://api.github.com/users/dkefer/gists{/gist_id}","starred_url":"https://api.github.com/users/dkefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkefer/subscriptions","organizations_url":"https://api.github.com/users/dkefer/orgs","repos_url":"https://api.github.com/users/dkefer/repos","events_url":"https://api.github.com/users/dkefer/events{/privacy}","received_events_url":"https://api.github.com/users/dkefer/received_events","type":"User","site_admin":false},"body":"My fix proposal for issue https://github.com/pac4j/pac4j/issues/420","created_at":"2015-12-29T13:28:17Z","updated_at":"2015-12-30T08:29:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ecfca81d7537d21339a84aee316f02f85611a17","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pac4j/pac4j/pulls/421/commits","review_comments_url":"https://api.github.com/repos/pac4j/pac4j/pulls/421/comments","review_comment_url":"https://api.github.com/repos/pac4j/pac4j/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pac4j/pac4j/issues/421/comments","statuses_url":"https://api.github.com/repos/pac4j/pac4j/statuses/c5ee3fe9c6ff383161a6fce1bf103a40e01bcfbe","head":{"label":"dkefer:master","ref":"master","sha":"c5ee3fe9c6ff383161a6fce1bf103a40e01bcfbe","user":{"login":"dkefer","id":13050398,"avatar_url":"https://avatars.githubusercontent.com/u/13050398?v=3","gravatar_id":"","url":"https://api.github.com/users/dkefer","html_url":"https://github.com/dkefer","followers_url":"https://api.github.com/users/dkefer/followers","following_url":"https://api.github.com/users/dkefer/following{/other_user}","gists_url":"https://api.github.com/users/dkefer/gists{/gist_id}","starred_url":"https://api.github.com/users/dkefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkefer/subscriptions","organizations_url":"https://api.github.com/users/dkefer/orgs","repos_url":"https://api.github.com/users/dkefer/repos","events_url":"https://api.github.com/users/dkefer/events{/privacy}","received_events_url":"https://api.github.com/users/dkefer/received_events","type":"User","site_admin":false},"repo":{"id":48748275,"name":"pac4j","full_name":"dkefer/pac4j","owner":{"login":"dkefer","id":13050398,"avatar_url":"https://avatars.githubusercontent.com/u/13050398?v=3","gravatar_id":"","url":"https://api.github.com/users/dkefer","html_url":"https://github.com/dkefer","followers_url":"https://api.github.com/users/dkefer/followers","following_url":"https://api.github.com/users/dkefer/following{/other_user}","gists_url":"https://api.github.com/users/dkefer/gists{/gist_id}","starred_url":"https://api.github.com/users/dkefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkefer/subscriptions","organizations_url":"https://api.github.com/users/dkefer/orgs","repos_url":"https://api.github.com/users/dkefer/repos","events_url":"https://api.github.com/users/dkefer/events{/privacy}","received_events_url":"https://api.github.com/users/dkefer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkefer/pac4j","description":"Security engine for Java (authentication, authorization, multi frameworks)","fork":true,"url":"https://api.github.com/repos/dkefer/pac4j","forks_url":"https://api.github.com/repos/dkefer/pac4j/forks","keys_url":"https://api.github.com/repos/dkefer/pac4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkefer/pac4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkefer/pac4j/teams","hooks_url":"https://api.github.com/repos/dkefer/pac4j/hooks","issue_events_url":"https://api.github.com/repos/dkefer/pac4j/issues/events{/number}","events_url":"https://api.github.com/repos/dkefer/pac4j/events","assignees_url":"https://api.github.com/repos/dkefer/pac4j/assignees{/user}","branches_url":"https://api.github.com/repos/dkefer/pac4j/branches{/branch}","tags_url":"https://api.github.com/repos/dkefer/pac4j/tags","blobs_url":"https://api.github.com/repos/dkefer/pac4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkefer/pac4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkefer/pac4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkefer/pac4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkefer/pac4j/statuses/{sha}","languages_url":"https://api.github.com/repos/dkefer/pac4j/languages","stargazers_url":"https://api.github.com/repos/dkefer/pac4j/stargazers","contributors_url":"https://api.github.com/repos/dkefer/pac4j/contributors","subscribers_url":"https://api.github.com/repos/dkefer/pac4j/subscribers","subscription_url":"https://api.github.com/repos/dkefer/pac4j/subscription","commits_url":"https://api.github.com/repos/dkefer/pac4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkefer/pac4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkefer/pac4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkefer/pac4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkefer/pac4j/contents/{+path}","compare_url":"https://api.github.com/repos/dkefer/pac4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkefer/pac4j/merges","archive_url":"https://api.github.com/repos/dkefer/pac4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkefer/pac4j/downloads","issues_url":"https://api.github.com/repos/dkefer/pac4j/issues{/number}","pulls_url":"https://api.github.com/repos/dkefer/pac4j/pulls{/number}","milestones_url":"https://api.github.com/repos/dkefer/pac4j/milestones{/number}","notifications_url":"https://api.github.com/repos/dkefer/pac4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkefer/pac4j/labels{/name}","releases_url":"https://api.github.com/repos/dkefer/pac4j/releases{/id}","created_at":"2015-12-29T13:16:09Z","updated_at":"2015-12-29T13:16:11Z","pushed_at":"2015-12-29T13:23:27Z","git_url":"git://github.com/dkefer/pac4j.git","ssh_url":"git@github.com:dkefer/pac4j.git","clone_url":"https://github.com/dkefer/pac4j.git","svn_url":"https://github.com/dkefer/pac4j","homepage":"http://www.pac4j.org","size":19043,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pac4j:master","ref":"master","sha":"406c12e075db467f8ec21a251733473195dc3038","user":{"login":"pac4j","id":7540865,"avatar_url":"https://avatars.githubusercontent.com/u/7540865?v=3","gravatar_id":"","url":"https://api.github.com/users/pac4j","html_url":"https://github.com/pac4j","followers_url":"https://api.github.com/users/pac4j/followers","following_url":"https://api.github.com/users/pac4j/following{/other_user}","gists_url":"https://api.github.com/users/pac4j/gists{/gist_id}","starred_url":"https://api.github.com/users/pac4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pac4j/subscriptions","organizations_url":"https://api.github.com/users/pac4j/orgs","repos_url":"https://api.github.com/users/pac4j/repos","events_url":"https://api.github.com/users/pac4j/events{/privacy}","received_events_url":"https://api.github.com/users/pac4j/received_events","type":"Organization","site_admin":false},"repo":{"id":3291848,"name":"pac4j","full_name":"pac4j/pac4j","owner":{"login":"pac4j","id":7540865,"avatar_url":"https://avatars.githubusercontent.com/u/7540865?v=3","gravatar_id":"","url":"https://api.github.com/users/pac4j","html_url":"https://github.com/pac4j","followers_url":"https://api.github.com/users/pac4j/followers","following_url":"https://api.github.com/users/pac4j/following{/other_user}","gists_url":"https://api.github.com/users/pac4j/gists{/gist_id}","starred_url":"https://api.github.com/users/pac4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pac4j/subscriptions","organizations_url":"https://api.github.com/users/pac4j/orgs","repos_url":"https://api.github.com/users/pac4j/repos","events_url":"https://api.github.com/users/pac4j/events{/privacy}","received_events_url":"https://api.github.com/users/pac4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pac4j/pac4j","description":"Security engine for Java (authentication, authorization, multi frameworks)","fork":false,"url":"https://api.github.com/repos/pac4j/pac4j","forks_url":"https://api.github.com/repos/pac4j/pac4j/forks","keys_url":"https://api.github.com/repos/pac4j/pac4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pac4j/pac4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pac4j/pac4j/teams","hooks_url":"https://api.github.com/repos/pac4j/pac4j/hooks","issue_events_url":"https://api.github.com/repos/pac4j/pac4j/issues/events{/number}","events_url":"https://api.github.com/repos/pac4j/pac4j/events","assignees_url":"https://api.github.com/repos/pac4j/pac4j/assignees{/user}","branches_url":"https://api.github.com/repos/pac4j/pac4j/branches{/branch}","tags_url":"https://api.github.com/repos/pac4j/pac4j/tags","blobs_url":"https://api.github.com/repos/pac4j/pac4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pac4j/pac4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pac4j/pac4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/pac4j/pac4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pac4j/pac4j/statuses/{sha}","languages_url":"https://api.github.com/repos/pac4j/pac4j/languages","stargazers_url":"https://api.github.com/repos/pac4j/pac4j/stargazers","contributors_url":"https://api.github.com/repos/pac4j/pac4j/contributors","subscribers_url":"https://api.github.com/repos/pac4j/pac4j/subscribers","subscription_url":"https://api.github.com/repos/pac4j/pac4j/subscription","commits_url":"https://api.github.com/repos/pac4j/pac4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/pac4j/pac4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/pac4j/pac4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/pac4j/pac4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/pac4j/pac4j/contents/{+path}","compare_url":"https://api.github.com/repos/pac4j/pac4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pac4j/pac4j/merges","archive_url":"https://api.github.com/repos/pac4j/pac4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pac4j/pac4j/downloads","issues_url":"https://api.github.com/repos/pac4j/pac4j/issues{/number}","pulls_url":"https://api.github.com/repos/pac4j/pac4j/pulls{/number}","milestones_url":"https://api.github.com/repos/pac4j/pac4j/milestones{/number}","notifications_url":"https://api.github.com/repos/pac4j/pac4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pac4j/pac4j/labels{/name}","releases_url":"https://api.github.com/repos/pac4j/pac4j/releases{/id}","created_at":"2012-01-28T17:04:12Z","updated_at":"2015-12-29T22:58:31Z","pushed_at":"2015-12-30T08:08:55Z","git_url":"git://github.com/pac4j/pac4j.git","ssh_url":"git@github.com:pac4j/pac4j.git","clone_url":"https://github.com/pac4j/pac4j.git","svn_url":"https://github.com/pac4j/pac4j","homepage":"http://www.pac4j.org","size":19691,"stargazers_count":418,"watchers_count":418,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":159,"mirror_url":null,"open_issues_count":33,"forks":159,"open_issues":33,"watchers":418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pac4j/pac4j/pulls/421"},"html":{"href":"https://github.com/pac4j/pac4j/pull/421"},"issue":{"href":"https://api.github.com/repos/pac4j/pac4j/issues/421"},"comments":{"href":"https://api.github.com/repos/pac4j/pac4j/issues/421/comments"},"review_comments":{"href":"https://api.github.com/repos/pac4j/pac4j/pulls/421/comments"},"review_comment":{"href":"https://api.github.com/repos/pac4j/pac4j/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pac4j/pac4j/pulls/421/commits"},"statuses":{"href":"https://api.github.com/repos/pac4j/pac4j/statuses/c5ee3fe9c6ff383161a6fce1bf103a40e01bcfbe"}}}}