Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
django-sshkey
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
c4447f77
authored
Sep 15, 2014
by
Scott Duckworth
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/2.3.2'
parents
c7cf91db
5a25a19f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
4 deletions
+34
-4
MANIFEST.in
+1
-0
RELEASE-NOTES.rst
+6
-0
django_sshkey/__init__.py
+1
-1
django_sshkey/models.py
+5
-0
django_sshkey/templates.example/sshkey/userkey_list.html
+4
-3
django_sshkey/tests.py
+17
-0
No files found.
MANIFEST.in
View file @
c4447f77
include LICENSE
include LICENSE
include README.rst
include README.rst
include README.upgrading.rst
include README.upgrading.rst
include RELEASE-NOTES.rst
include lookup.py
include lookup.py
include lookup.sh
include lookup.sh
include django-sshkey-lookup
include django-sshkey-lookup
...
...
RELEASE-NOTES.rst
View file @
c4447f77
...
@@ -2,6 +2,12 @@
...
@@ -2,6 +2,12 @@
Release Notes for django-sshkey
Release Notes for django-sshkey
===============================
===============================
2.3.2 (2014-09-15)
------------------
* Bug fix #1: entering whitespace for key field results in IndexError
* Make example templates work with Django 1.4+
2.3.1 (2014-07-29)
2.3.1 (2014-07-29)
------------------
------------------
...
...
django_sshkey/__init__.py
View file @
c4447f77
...
@@ -26,4 +26,4 @@
...
@@ -26,4 +26,4 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
__version__
=
'2.3.
1
'
__version__
=
'2.3.
2
'
django_sshkey/models.py
View file @
c4447f77
...
@@ -60,8 +60,13 @@ class UserKey(models.Model):
...
@@ -60,8 +60,13 @@ class UserKey(models.Model):
def
clean_fields
(
self
,
exclude
=
None
):
def
clean_fields
(
self
,
exclude
=
None
):
if
not
exclude
or
'key'
not
in
exclude
:
if
not
exclude
or
'key'
not
in
exclude
:
self
.
key
=
self
.
key
.
strip
()
self
.
key
=
self
.
key
.
strip
()
if
not
self
.
key
:
raise
ValidationError
({
'key'
:
[
"This field is required."
]})
def
clean
(
self
):
def
clean
(
self
):
self
.
key
=
self
.
key
.
strip
()
if
not
self
.
key
:
return
try
:
try
:
pubkey
=
pubkey_parse
(
self
.
key
)
pubkey
=
pubkey_parse
(
self
.
key
)
except
PublicKeyParseError
as
e
:
except
PublicKeyParseError
as
e
:
...
...
django_sshkey/templates.example/sshkey/userkey_list.html
View file @
c4447f77
{% load url from future %}
<h1>
My Keys
</h1>
<h1>
My Keys
</h1>
{% if messages %}
{% if messages %}
<ul
class=
"messages"
>
<ul
class=
"messages"
>
...
@@ -6,7 +7,7 @@
...
@@ -6,7 +7,7 @@
{% endfor %}
{% endfor %}
</ul>
</ul>
{% endif %}
{% endif %}
<p><a
href=
"{% url
django_sshkey.views.userkey_add
%}"
>
Add Key
</a></p>
<p><a
href=
"{% url
"
django_sshkey
.
views
.
userkey_add
"
%}"
>
Add Key
</a></p>
<table>
<table>
<tr>
<tr>
<th>
Key
</th>
<th>
Key
</th>
...
@@ -29,9 +30,9 @@
...
@@ -29,9 +30,9 @@
<td>
{{ userkey.last_used|default:"never" }}
</td>
<td>
{{ userkey.last_used|default:"never" }}
</td>
<td>
<td>
{% if allow_edit %}
{% if allow_edit %}
<a
href=
"{% url
django_sshkey.views.userkey_edit
userkey.pk %}"
>
Edit
</a>
<a
href=
"{% url
"
django_sshkey
.
views
.
userkey_edit
"
userkey
.
pk
%}"
>
Edit
</a>
{% endif %}
{% endif %}
<a
href=
"{% url
django_sshkey.views.userkey_delete
userkey.pk %}"
>
Delete
</a>
<a
href=
"{% url
"
django_sshkey
.
views
.
userkey_delete
"
userkey
.
pk
%}"
>
Delete
</a>
</td>
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
...
...
django_sshkey/tests.py
View file @
c4447f77
...
@@ -255,6 +255,23 @@ class UserKeyCreationTestCase(BaseTestCase):
...
@@ -255,6 +255,23 @@ class UserKeyCreationTestCase(BaseTestCase):
)
)
self
.
assertRaises
(
ValidationError
,
key2
.
full_clean
)
self
.
assertRaises
(
ValidationError
,
key2
.
full_clean
)
def
test_blank_key_fails
(
self
):
key
=
UserKey
(
user
=
self
.
user1
,
name
=
'name1'
,
key
=
''
,
)
self
.
assertRaises
(
ValidationError
,
key
.
full_clean
)
def
test_ws_key_fails
(
self
):
key
=
UserKey
(
user
=
self
.
user1
,
name
=
'name1'
,
key
=
' '
,
)
self
.
assertRaises
(
ValidationError
,
key
.
full_clean
)
class
RFC4716TestCase
(
BaseTestCase
):
class
RFC4716TestCase
(
BaseTestCase
):
@classmethod
@classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment