{"action":"created","issue":{"url":"https://api.github.com/repos/agentrickard/domain/issues/427","repository_url":"https://api.github.com/repos/agentrickard/domain","labels_url":"https://api.github.com/repos/agentrickard/domain/issues/427/labels{/name}","comments_url":"https://api.github.com/repos/agentrickard/domain/issues/427/comments","events_url":"https://api.github.com/repos/agentrickard/domain/issues/427/events","html_url":"https://github.com/agentrickard/domain/issues/427","id":331145196,"node_id":"MDU6SXNzdWUzMzExNDUxOTY=","number":427,"title":"\"login_paths\" install/default setting includes \\r\\n literally, which doesn't work.","user":{"login":"rivimey","id":1536678,"node_id":"MDQ6VXNlcjE1MzY2Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1536678?v=4","gravatar_id":"","url":"https://api.github.com/users/rivimey","html_url":"https://github.com/rivimey","followers_url":"https://api.github.com/users/rivimey/followers","following_url":"https://api.github.com/users/rivimey/following{/other_user}","gists_url":"https://api.github.com/users/rivimey/gists{/gist_id}","starred_url":"https://api.github.com/users/rivimey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rivimey/subscriptions","organizations_url":"https://api.github.com/users/rivimey/orgs","repos_url":"https://api.github.com/users/rivimey/repos","events_url":"https://api.github.com/users/rivimey/events{/privacy}","received_events_url":"https://api.github.com/users/rivimey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-11T11:13:08Z","updated_at":"2018-06-19T09:21:56Z","closed_at":"2018-06-19T09:21:56Z","author_association":"NONE","body":"The domain settings form has an install/default value for login_paths of \"/user/login\\r\\n/user/password\", which is treated literally, that is \\r is not \\013 and \\n is not \\011. The value that counts appears to be the one in domain.settings.yml. Although there is _also_ a value listed in DomainSettingsForm as the second parameter to $config->get():\r\n\r\n      '#default_value' => $config->get('login_paths', \"/user/login\\r\\n/user/password\"),\r\n\r\n... the get() function doesn't have a second parameter so the 'default' value is unused.\r\n\r\n[Tests show that at the place this is used, class DomainAccessCheck, function `matchPath` doesn't do the right thing:\r\n    return !$this->pathMatcher->matchPath($path, $allowed_paths);\r\nfails when allowed_paths has the install/default value and $path is \"/user/login\".]\r\n\r\nThe appropriate fix would seem to be:\r\n\r\n - modify the login_paths yml value to be an array of lines, so it can be set in domain.settings.yml as:\r\n\r\n```\r\n    login_paths:\r\n      - '/user/login'\r\n      - '/user/password'\r\n```\r\n\r\n and adjust get() calls appropriately.\r\n\r\n- modify the erroneous #default_value config get() to use this or an equivalent value also.\r\n  + Q: can we read the default for the form directly from domain.settings.yml?\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/agentrickard/domain/issues/comments/398333982","html_url":"https://github.com/agentrickard/domain/issues/427#issuecomment-398333982","issue_url":"https://api.github.com/repos/agentrickard/domain/issues/427","id":398333982,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODMzMzk4Mg==","user":{"login":"rivimey","id":1536678,"node_id":"MDQ6VXNlcjE1MzY2Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1536678?v=4","gravatar_id":"","url":"https://api.github.com/users/rivimey","html_url":"https://github.com/rivimey","followers_url":"https://api.github.com/users/rivimey/followers","following_url":"https://api.github.com/users/rivimey/following{/other_user}","gists_url":"https://api.github.com/users/rivimey/gists{/gist_id}","starred_url":"https://api.github.com/users/rivimey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rivimey/subscriptions","organizations_url":"https://api.github.com/users/rivimey/orgs","repos_url":"https://api.github.com/users/rivimey/repos","events_url":"https://api.github.com/users/rivimey/events{/privacy}","received_events_url":"https://api.github.com/users/rivimey/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T09:21:56Z","updated_at":"2018-06-19T09:21:56Z","author_association":"NONE","body":"I realize that the change using multiple lines in yml make it an array in code, but thought that if we really needed it the CRLF could be added with some form of implode().\r\n\r\nAnyway, the PR looks good to me... FWIW approved."}}
{"actor":{"display_login":"rivimey"}}