{"action":"created","comment":{"url":"https://api.github.com/repos/borgbackup/borg/pulls/comments/67620244","id":67620244,"diff_hunk":"@@ -773,6 +773,14 @@ def parse(self, text):\n         if not valid:\n             return False\n         self.archive = m.group('archive')\n+        return self._is_archive_name_printable()\n+\n+    # lookout for non-printable characters\n+    def _is_archive_name_printable(self):\n+        if self.archive:\n+            for char in self.archive:\n+                if unicodedata.category(char)[0] == 'C':\n+                    return False\n         return True","path":"src/borg/helpers.py","position":33,"original_position":33,"commit_id":"e9388281792d4d7782a0c684cf3db4ff999308e4","original_commit_id":"e9388281792d4d7782a0c684cf3db4ff999308e4","user":{"login":"Abogical","id":10688496,"avatar_url":"https://avatars.githubusercontent.com/u/10688496?v=3","gravatar_id":"","url":"https://api.github.com/users/Abogical","html_url":"https://github.com/Abogical","followers_url":"https://api.github.com/users/Abogical/followers","following_url":"https://api.github.com/users/Abogical/following{/other_user}","gists_url":"https://api.github.com/users/Abogical/gists{/gist_id}","starred_url":"https://api.github.com/users/Abogical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abogical/subscriptions","organizations_url":"https://api.github.com/users/Abogical/orgs","repos_url":"https://api.github.com/users/Abogical/repos","events_url":"https://api.github.com/users/Abogical/events{/privacy}","received_events_url":"https://api.github.com/users/Abogical/received_events","type":"User","site_admin":false},"body":"I've looked it up, such a function, dissapointedly, doesn't exist. The closest functions would be string.printable and curses.ascii.isprint(), but they only only on ASCII, not unicode.","created_at":"2016-06-19T17:06:58Z","updated_at":"2016-06-19T17:06:58Z","html_url":"https://github.com/borgbackup/borg/pull/1174#discussion_r67620244","pull_request_url":"https://api.github.com/repos/borgbackup/borg/pulls/1174","_links":{"self":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/comments/67620244"},"html":{"href":"https://github.com/borgbackup/borg/pull/1174#discussion_r67620244"},"pull_request":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/1174"}}},"pull_request":{"url":"https://api.github.com/repos/borgbackup/borg/pulls/1174","id":73945804,"html_url":"https://github.com/borgbackup/borg/pull/1174","diff_url":"https://github.com/borgbackup/borg/pull/1174.diff","patch_url":"https://github.com/borgbackup/borg/pull/1174.patch","issue_url":"https://api.github.com/repos/borgbackup/borg/issues/1174","number":1174,"state":"open","locked":false,"title":"Reject weird archive names, for #1166","user":{"login":"Abogical","id":10688496,"avatar_url":"https://avatars.githubusercontent.com/u/10688496?v=3","gravatar_id":"","url":"https://api.github.com/users/Abogical","html_url":"https://github.com/Abogical","followers_url":"https://api.github.com/users/Abogical/followers","following_url":"https://api.github.com/users/Abogical/following{/other_user}","gists_url":"https://api.github.com/users/Abogical/gists{/gist_id}","starred_url":"https://api.github.com/users/Abogical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abogical/subscriptions","organizations_url":"https://api.github.com/users/Abogical/orgs","repos_url":"https://api.github.com/users/Abogical/repos","events_url":"https://api.github.com/users/Abogical/events{/privacy}","received_events_url":"https://api.github.com/users/Abogical/received_events","type":"User","site_admin":false},"body":"This prevents the creation of new archives to have this 'crap'. However this doesn't do anything for old archives which have those weird names. ","created_at":"2016-06-15T16:46:45Z","updated_at":"2016-06-19T17:06:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f898ba9786758bfac33e4bfb13d8c12707be1f8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/borgbackup/borg/pulls/1174/commits","review_comments_url":"https://api.github.com/repos/borgbackup/borg/pulls/1174/comments","review_comment_url":"https://api.github.com/repos/borgbackup/borg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/borgbackup/borg/issues/1174/comments","statuses_url":"https://api.github.com/repos/borgbackup/borg/statuses/e9388281792d4d7782a0c684cf3db4ff999308e4","head":{"label":"Abogical:master","ref":"master","sha":"e9388281792d4d7782a0c684cf3db4ff999308e4","user":{"login":"Abogical","id":10688496,"avatar_url":"https://avatars.githubusercontent.com/u/10688496?v=3","gravatar_id":"","url":"https://api.github.com/users/Abogical","html_url":"https://github.com/Abogical","followers_url":"https://api.github.com/users/Abogical/followers","following_url":"https://api.github.com/users/Abogical/following{/other_user}","gists_url":"https://api.github.com/users/Abogical/gists{/gist_id}","starred_url":"https://api.github.com/users/Abogical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abogical/subscriptions","organizations_url":"https://api.github.com/users/Abogical/orgs","repos_url":"https://api.github.com/users/Abogical/repos","events_url":"https://api.github.com/users/Abogical/events{/privacy}","received_events_url":"https://api.github.com/users/Abogical/received_events","type":"User","site_admin":false},"repo":{"id":61130037,"name":"borg","full_name":"Abogical/borg","owner":{"login":"Abogical","id":10688496,"avatar_url":"https://avatars.githubusercontent.com/u/10688496?v=3","gravatar_id":"","url":"https://api.github.com/users/Abogical","html_url":"https://github.com/Abogical","followers_url":"https://api.github.com/users/Abogical/followers","following_url":"https://api.github.com/users/Abogical/following{/other_user}","gists_url":"https://api.github.com/users/Abogical/gists{/gist_id}","starred_url":"https://api.github.com/users/Abogical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abogical/subscriptions","organizations_url":"https://api.github.com/users/Abogical/orgs","repos_url":"https://api.github.com/users/Abogical/repos","events_url":"https://api.github.com/users/Abogical/events{/privacy}","received_events_url":"https://api.github.com/users/Abogical/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Abogical/borg","description":"Deduplicating backup program with compression and authenticated encryption.","fork":true,"url":"https://api.github.com/repos/Abogical/borg","forks_url":"https://api.github.com/repos/Abogical/borg/forks","keys_url":"https://api.github.com/repos/Abogical/borg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Abogical/borg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Abogical/borg/teams","hooks_url":"https://api.github.com/repos/Abogical/borg/hooks","issue_events_url":"https://api.github.com/repos/Abogical/borg/issues/events{/number}","events_url":"https://api.github.com/repos/Abogical/borg/events","assignees_url":"https://api.github.com/repos/Abogical/borg/assignees{/user}","branches_url":"https://api.github.com/repos/Abogical/borg/branches{/branch}","tags_url":"https://api.github.com/repos/Abogical/borg/tags","blobs_url":"https://api.github.com/repos/Abogical/borg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Abogical/borg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Abogical/borg/git/refs{/sha}","trees_url":"https://api.github.com/repos/Abogical/borg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Abogical/borg/statuses/{sha}","languages_url":"https://api.github.com/repos/Abogical/borg/languages","stargazers_url":"https://api.github.com/repos/Abogical/borg/stargazers","contributors_url":"https://api.github.com/repos/Abogical/borg/contributors","subscribers_url":"https://api.github.com/repos/Abogical/borg/subscribers","subscription_url":"https://api.github.com/repos/Abogical/borg/subscription","commits_url":"https://api.github.com/repos/Abogical/borg/commits{/sha}","git_commits_url":"https://api.github.com/repos/Abogical/borg/git/commits{/sha}","comments_url":"https://api.github.com/repos/Abogical/borg/comments{/number}","issue_comment_url":"https://api.github.com/repos/Abogical/borg/issues/comments{/number}","contents_url":"https://api.github.com/repos/Abogical/borg/contents/{+path}","compare_url":"https://api.github.com/repos/Abogical/borg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Abogical/borg/merges","archive_url":"https://api.github.com/repos/Abogical/borg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Abogical/borg/downloads","issues_url":"https://api.github.com/repos/Abogical/borg/issues{/number}","pulls_url":"https://api.github.com/repos/Abogical/borg/pulls{/number}","milestones_url":"https://api.github.com/repos/Abogical/borg/milestones{/number}","notifications_url":"https://api.github.com/repos/Abogical/borg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Abogical/borg/labels{/name}","releases_url":"https://api.github.com/repos/Abogical/borg/releases{/id}","deployments_url":"https://api.github.com/repos/Abogical/borg/deployments","created_at":"2016-06-14T14:34:16Z","updated_at":"2016-06-14T14:34:26Z","pushed_at":"2016-06-16T23:56:09Z","git_url":"git://github.com/Abogical/borg.git","ssh_url":"git@github.com:Abogical/borg.git","clone_url":"https://github.com/Abogical/borg.git","svn_url":"https://github.com/Abogical/borg","homepage":"https://borgbackup.readthedocs.io/","size":4248,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"borgbackup:master","ref":"master","sha":"9a64835b4d0794120c42c5e8bfa58fdb33b4bdec","user":{"login":"borgbackup","id":12418060,"avatar_url":"https://avatars.githubusercontent.com/u/12418060?v=3","gravatar_id":"","url":"https://api.github.com/users/borgbackup","html_url":"https://github.com/borgbackup","followers_url":"https://api.github.com/users/borgbackup/followers","following_url":"https://api.github.com/users/borgbackup/following{/other_user}","gists_url":"https://api.github.com/users/borgbackup/gists{/gist_id}","starred_url":"https://api.github.com/users/borgbackup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgbackup/subscriptions","organizations_url":"https://api.github.com/users/borgbackup/orgs","repos_url":"https://api.github.com/users/borgbackup/repos","events_url":"https://api.github.com/users/borgbackup/events{/privacy}","received_events_url":"https://api.github.com/users/borgbackup/received_events","type":"Organization","site_admin":false},"repo":{"id":35517126,"name":"borg","full_name":"borgbackup/borg","owner":{"login":"borgbackup","id":12418060,"avatar_url":"https://avatars.githubusercontent.com/u/12418060?v=3","gravatar_id":"","url":"https://api.github.com/users/borgbackup","html_url":"https://github.com/borgbackup","followers_url":"https://api.github.com/users/borgbackup/followers","following_url":"https://api.github.com/users/borgbackup/following{/other_user}","gists_url":"https://api.github.com/users/borgbackup/gists{/gist_id}","starred_url":"https://api.github.com/users/borgbackup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgbackup/subscriptions","organizations_url":"https://api.github.com/users/borgbackup/orgs","repos_url":"https://api.github.com/users/borgbackup/repos","events_url":"https://api.github.com/users/borgbackup/events{/privacy}","received_events_url":"https://api.github.com/users/borgbackup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/borgbackup/borg","description":"Deduplicating backup program with compression and authenticated encryption.","fork":false,"url":"https://api.github.com/repos/borgbackup/borg","forks_url":"https://api.github.com/repos/borgbackup/borg/forks","keys_url":"https://api.github.com/repos/borgbackup/borg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/borgbackup/borg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/borgbackup/borg/teams","hooks_url":"https://api.github.com/repos/borgbackup/borg/hooks","issue_events_url":"https://api.github.com/repos/borgbackup/borg/issues/events{/number}","events_url":"https://api.github.com/repos/borgbackup/borg/events","assignees_url":"https://api.github.com/repos/borgbackup/borg/assignees{/user}","branches_url":"https://api.github.com/repos/borgbackup/borg/branches{/branch}","tags_url":"https://api.github.com/repos/borgbackup/borg/tags","blobs_url":"https://api.github.com/repos/borgbackup/borg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/borgbackup/borg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/borgbackup/borg/git/refs{/sha}","trees_url":"https://api.github.com/repos/borgbackup/borg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/borgbackup/borg/statuses/{sha}","languages_url":"https://api.github.com/repos/borgbackup/borg/languages","stargazers_url":"https://api.github.com/repos/borgbackup/borg/stargazers","contributors_url":"https://api.github.com/repos/borgbackup/borg/contributors","subscribers_url":"https://api.github.com/repos/borgbackup/borg/subscribers","subscription_url":"https://api.github.com/repos/borgbackup/borg/subscription","commits_url":"https://api.github.com/repos/borgbackup/borg/commits{/sha}","git_commits_url":"https://api.github.com/repos/borgbackup/borg/git/commits{/sha}","comments_url":"https://api.github.com/repos/borgbackup/borg/comments{/number}","issue_comment_url":"https://api.github.com/repos/borgbackup/borg/issues/comments{/number}","contents_url":"https://api.github.com/repos/borgbackup/borg/contents/{+path}","compare_url":"https://api.github.com/repos/borgbackup/borg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/borgbackup/borg/merges","archive_url":"https://api.github.com/repos/borgbackup/borg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/borgbackup/borg/downloads","issues_url":"https://api.github.com/repos/borgbackup/borg/issues{/number}","pulls_url":"https://api.github.com/repos/borgbackup/borg/pulls{/number}","milestones_url":"https://api.github.com/repos/borgbackup/borg/milestones{/number}","notifications_url":"https://api.github.com/repos/borgbackup/borg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/borgbackup/borg/labels{/name}","releases_url":"https://api.github.com/repos/borgbackup/borg/releases{/id}","deployments_url":"https://api.github.com/repos/borgbackup/borg/deployments","created_at":"2015-05-12T23:10:47Z","updated_at":"2016-06-19T14:50:59Z","pushed_at":"2016-06-19T15:07:01Z","git_url":"git://github.com/borgbackup/borg.git","ssh_url":"git@github.com:borgbackup/borg.git","clone_url":"https://github.com/borgbackup/borg.git","svn_url":"https://github.com/borgbackup/borg","homepage":"https://borgbackup.readthedocs.io/","size":5079,"stargazers_count":1285,"watchers_count":1285,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":106,"mirror_url":null,"open_issues_count":192,"forks":106,"open_issues":192,"watchers":1285,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/1174"},"html":{"href":"https://github.com/borgbackup/borg/pull/1174"},"issue":{"href":"https://api.github.com/repos/borgbackup/borg/issues/1174"},"comments":{"href":"https://api.github.com/repos/borgbackup/borg/issues/1174/comments"},"review_comments":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/1174/comments"},"review_comment":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/1174/commits"},"statuses":{"href":"https://api.github.com/repos/borgbackup/borg/statuses/e9388281792d4d7782a0c684cf3db4ff999308e4"}}}}
{"actor":{"display_login":"Abogical"}}