From a754248d1534fa7c469285cd26ad8e0c0772600c Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Feb 02 2016 10:47:38 +0000 Subject: [PATCH 1/2] fix for #653 add ssh_info to blacklist in default config this is to stop a user from creating a project ssh_info that conflicts with the pagure page that lists the ssh info for the pagure instance Resolves: #653 --- diff --git a/pagure/default_config.py b/pagure/default_config.py index 0ea6c6e..39faad0 100644 --- a/pagure/default_config.py +++ b/pagure/default_config.py @@ -182,7 +182,7 @@ APPLICATION_ROOT = '/' # List of blacklisted project names BLACKLISTED_PROJECTS = [ 'static', 'pv', 'releases', 'new', 'api', 'settings', - 'logout', 'login', 'users', 'groups', 'projects'] + 'logout', 'login', 'users', 'groups', 'projects', 'ssh_info'] ACLS = { 'issue_create': 'Create a new ticket against this project', From c988d8d038729f82fca2ba280437b3b716d46c33 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Feb 02 2016 10:47:38 +0000 Subject: [PATCH 2/2] fix for #652: restyled the ssh_info page Small changes to the ssh_info page to match the new UI --- diff --git a/pagure/static/pagure.css b/pagure/static/pagure.css index dbf8bd5..90ca16a 100644 --- a/pagure/static/pagure.css +++ b/pagure/static/pagure.css @@ -443,3 +443,9 @@ a.notblue { border: 5px solid #fff; box-shadow: 0 0 5px #999; } + +pre.softwrap +{ + white-space: pre-wrap; + word-wrap: break-word; +} diff --git a/pagure/templates/doc_ssh_keys.html b/pagure/templates/doc_ssh_keys.html index 82f1406..0cc3139 100644 --- a/pagure/templates/doc_ssh_keys.html +++ b/pagure/templates/doc_ssh_keys.html @@ -5,29 +5,42 @@ {% block content %} +
+

SSH Hostkeys/Fingerprints

-

SSH Hostkeys/Fingerprints

+{% if config.get('SSH_KEYS') %} -SSH host keys and fingerprints can be use to ensure you are connecting to +

+ SSH host keys and fingerprints can be use to ensure you are connecting to pagure's server and not someone else's. +

+

Here below are the SSH Hostkey and the Fingerprint of this current pagure instance: - -{% if config.get('SSH_KEYS') %} +

{% for cert in config.get('SSH_KEYS') %} -

{{ cert }} Fingerprint

-
{{ config['SSH_KEYS'][cert]['fingerprint'] }}
+
+
+ {{ cert }} Fingerprint +
+
{{ config['SSH_KEYS'][cert]['fingerprint'] }}
+
+ +
+
+ {{ cert }} Hostkey +
+
{{ config['SSH_KEYS'][cert]['pubkey'] }}
+
-

{{ cert }} Hostkey

-
{{ config['SSH_KEYS'][cert]['pubkey'] }}
{% endfor %} {% else %} -

No SSH keys have been specified in the configuration file.

-

You should ask an admin to fill this information.

+
No SSH keys have been specified in the configuration file. +You should ask an admin to fill this information.
{% endif %} - +
{% endblock %}