{"action":"created","issue":{"url":"https://api.github.com/repos/paragonie/airship/issues/33","repository_url":"https://api.github.com/repos/paragonie/airship","labels_url":"https://api.github.com/repos/paragonie/airship/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/paragonie/airship/issues/33/comments","events_url":"https://api.github.com/repos/paragonie/airship/issues/33/events","html_url":"https://github.com/paragonie/airship/issues/33","id":160223095,"number":33,"title":"Saving Airship settings with \"Notarize Updates for other Airships?\" causes Hull to fail to load, no validation of user input?","user":{"login":"alexdenvir","id":1412074,"avatar_url":"https://avatars.githubusercontent.com/u/1412074?v=3","gravatar_id":"","url":"https://api.github.com/users/alexdenvir","html_url":"https://github.com/alexdenvir","followers_url":"https://api.github.com/users/alexdenvir/followers","following_url":"https://api.github.com/users/alexdenvir/following{/other_user}","gists_url":"https://api.github.com/users/alexdenvir/gists{/gist_id}","starred_url":"https://api.github.com/users/alexdenvir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexdenvir/subscriptions","organizations_url":"https://api.github.com/users/alexdenvir/orgs","repos_url":"https://api.github.com/users/alexdenvir/repos","events_url":"https://api.github.com/users/alexdenvir/events{/privacy}","received_events_url":"https://api.github.com/users/alexdenvir/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/paragonie/airship/labels/bug","name":"bug","color":"ee0701"}],"state":"open","locked":false,"assignee":{"login":"paragonie-scott","id":11591518,"avatar_url":"https://avatars.githubusercontent.com/u/11591518?v=3","gravatar_id":"","url":"https://api.github.com/users/paragonie-scott","html_url":"https://github.com/paragonie-scott","followers_url":"https://api.github.com/users/paragonie-scott/followers","following_url":"https://api.github.com/users/paragonie-scott/following{/other_user}","gists_url":"https://api.github.com/users/paragonie-scott/gists{/gist_id}","starred_url":"https://api.github.com/users/paragonie-scott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paragonie-scott/subscriptions","organizations_url":"https://api.github.com/users/paragonie-scott/orgs","repos_url":"https://api.github.com/users/paragonie-scott/repos","events_url":"https://api.github.com/users/paragonie-scott/events{/privacy}","received_events_url":"https://api.github.com/users/paragonie-scott/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/paragonie/airship/milestones/3","html_url":"https://github.com/paragonie/airship/milestones/Version%200.3.0","labels_url":"https://api.github.com/repos/paragonie/airship/milestones/3/labels","id":1791309,"number":3,"title":"Version 0.3.0","description":"Final pre-release beta (hopefully).","creator":{"login":"paragonie-scott","id":11591518,"avatar_url":"https://avatars.githubusercontent.com/u/11591518?v=3","gravatar_id":"","url":"https://api.github.com/users/paragonie-scott","html_url":"https://github.com/paragonie-scott","followers_url":"https://api.github.com/users/paragonie-scott/followers","following_url":"https://api.github.com/users/paragonie-scott/following{/other_user}","gists_url":"https://api.github.com/users/paragonie-scott/gists{/gist_id}","starred_url":"https://api.github.com/users/paragonie-scott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paragonie-scott/subscriptions","organizations_url":"https://api.github.com/users/paragonie-scott/orgs","repos_url":"https://api.github.com/users/paragonie-scott/repos","events_url":"https://api.github.com/users/paragonie-scott/events{/privacy}","received_events_url":"https://api.github.com/users/paragonie-scott/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":5,"state":"open","created_at":"2016-05-27T03:48:23Z","updated_at":"2016-06-14T16:32:54Z","due_on":"2016-06-25T04:00:00Z","closed_at":null},"comments":7,"created_at":"2016-06-14T16:15:56Z","updated_at":"2016-06-14T16:48:32Z","closed_at":null,"body":"### Summary\r\nUsing current master branch\r\n\r\nI go to `https://url.tld/bridge/admin/settings`, check \"Notarize Updates for other Airships?\", and click \"Save Settings\".\r\nNext, I log out of Bridge, and I restart php fpm on my server.\r\nI then go to `https://url.tld` to find nginx gives me a 500 error.\r\n\r\nFurther investigation suggests that when I saved the settings, config/universal.json was updated and saved `null` for `notary/channel`. Digging through the nginx error logs I find a fatal error, caused by `\\Airship\\Engine\\Security\\Util::noHTML` having its first parameter typed to `string`, but receiving `null` instead.\r\n\r\nManually updating universal.json to set the channel back to `paragonie`, and restarting php fpm fixes this.\r\n\r\n### Expected Outcome\r\n\r\nuniversal.json is updated correctly, and navigating to Hull should not trigger a fatal error\r\n\r\n### What Actually Happened\r\n\r\nuniversal.json is updated, but notary config is \"incomplete\"\r\n\r\n```json\r\n{\r\n    /* Universal Configuration for an Airship deployment */\r\n    \"airship\": {\r\n        \"trusted-supplier\": \"paragonie\"\r\n    },\r\n    \"auto-update\": {\r\n        \"ignore-peer-verification\": false,\r\n        \"check\": 3600,\r\n        \"major\": false,\r\n        \"minor\": true,\r\n        \"patch\": true,\r\n        \"test\":  false\r\n    },\r\n    \"cookie_index\": {\r\n        \"auth_token\": \"airship_token\"\r\n    },\r\n    \"debug\": false,\r\n    \"email\": {\r\n        \"from\": null\r\n    },\r\n    \"guest_groups\": [\r\n        1\r\n    ],\r\n    \"ledger\": {\r\n        \"driver\": \"file\",\r\n        \"path\":   \"\\/tmp\\/airship.log\"\r\n    },\r\n    \"guzzle\": [],\r\n    \"notary\": {\r\n        \"channel\": null,\r\n        \"enabled\": true\r\n    },\r\n    \"session_config\": {\r\n    \"cookie_domain\": \"\"\r\n},\r\n    \"session_index\": {\r\n        \"user_id\": \"userid\",\r\n        \"logout_token\": \"logout_token\"\r\n    },\r\n    \"tor-only\": false,\r\n    \"twig-cache\":  true\r\n}\r\n```\r\n\r\nStack trace from nginx error log\r\n```\r\nPHP message: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Airship\\Engine\\Security\\Util::noHTML() must be of the type string, null given, called in /{path}/src/lens_functions.php on line 317 and defined in /{path}/src/Engine/Security/Util.php:34\r\nStack trace:\r\n#0 /{path}/src/lens_functions.php(317): Airship\\Engine\\Security\\Util::noHTML(NULL)\r\n#1 /{path}/vendor/twig/twig/lib/Twig/Environment.php(403) : eval()'d code(65): Airship\\LensFunctions\\display_notary_tag()\r\n#2 /{path}/vendor/twig/twig/lib/Twig/Template.php(167): __TwigTemplate_35bb9ec878691b75b1629a21ef6449901f542f500bcc9d2f8ce3c2c7ffb6927a->block_head(Array, Array)\r\n#3 /{path}/vendor/twig/twig/lib/Twig/Environment.php(403) : eval()'d code(32): Twig_Template->displayBlock('head', Array, Array)\r\n#4 /{path}/vendor/twig/twig/lib/Twig/Template.php(387): __TwigTemplate_35bb9ec878691b75b1629a21ef6449901f542f500bcc9d2f8ce3c2c7ffb6927a->doDisplay(Array, Array)\r\n```\r\n\r\n### Common Issues\r\n\r\nPlease make sure all these boxes are checked before you submit your issue.\r\n\r\n- [x] You are running a supported version of PHP (7.0.x) (Run `php -v` from the command line)\r\n- [x] You have libsodium 1.0.9 or newer installed\r\n- [x] You have version 1.0.3 or newer of the PHP extension for libsodium installed\r\n"},"comment":{"url":"https://api.github.com/repos/paragonie/airship/issues/comments/225943482","html_url":"https://github.com/paragonie/airship/issues/33#issuecomment-225943482","issue_url":"https://api.github.com/repos/paragonie/airship/issues/33","id":225943482,"user":{"login":"alexdenvir","id":1412074,"avatar_url":"https://avatars.githubusercontent.com/u/1412074?v=3","gravatar_id":"","url":"https://api.github.com/users/alexdenvir","html_url":"https://github.com/alexdenvir","followers_url":"https://api.github.com/users/alexdenvir/followers","following_url":"https://api.github.com/users/alexdenvir/following{/other_user}","gists_url":"https://api.github.com/users/alexdenvir/gists{/gist_id}","starred_url":"https://api.github.com/users/alexdenvir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexdenvir/subscriptions","organizations_url":"https://api.github.com/users/alexdenvir/orgs","repos_url":"https://api.github.com/users/alexdenvir/repos","events_url":"https://api.github.com/users/alexdenvir/events{/privacy}","received_events_url":"https://api.github.com/users/alexdenvir/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T16:48:32Z","updated_at":"2016-06-14T16:48:32Z","body":"No problem :)\nIt's always fun contributing to new projects\n\nOn Tue, 14 Jun 2016, 17:32 Scott, <notifications@github.com> wrote:\n\n> The fix for this might not land for a few days, currently working on a\n> rather large piece. This will be the immediate next thing to address.\n>\n> Thanks a ton for reporting this. 👍\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/paragonie/airship/issues/33#issuecomment-225939034>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe/ABWL6tVoIMGPykSc8Vl54c2WMQvQd5LDks5qLte1gaJpZM4I1f9u>\n> .\n>\n"}}
{"actor":{"display_login":"alexdenvir"}}