lists.torproject.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
tor-commits
October 2014
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
tor-commits@lists.torproject.org
26 participants
1551 discussions
Start a n
N
ew thread
[pups/master] added a new db column (visits) which acts as a counter for visits per token by users
by lunar@torproject.org
11 Oct '14
11 Oct '14
commit 331658438dc31b8ae1b4e487a4aeccfd373d1419 Author: Sherief Alaa <sheriefalaa.w(a)gmail.com> Date: Mon Jun 2 06:40:54 2014 +0300 added a new db column (visits) which acts as a counter for visits per token by users --- pups/settings.py.sample | 1 + webchat/models.py | 12 +++++++++++- webchat/views.py | 17 +++++++++++------ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/pups/settings.py.sample b/pups/settings.py.sample index 97d4ab6..
…
[View More]
85607cf 100644 --- a/pups/settings.py.sample +++ b/pups/settings.py.sample @@ -98,6 +98,7 @@ INSTALLED_APPS = ( 'pups', 'webchat', 'stats', + 'south' ) TEMPLATE_CONTEXT_PROCESSORS = ( diff --git a/webchat/models.py b/webchat/models.py index b475a6d..375ba04 100644 --- a/webchat/models.py +++ b/webchat/models.py @@ -36,9 +36,10 @@ class Token(models.Model): created_at = models.DateTimeField(auto_now_add=True) expires_at = models.DateTimeField() comment = models.CharField(max_length=128) + visits = models.IntegerField(default=0) def __unicode__(self): - return u'ID: %s Owner: %s' % (self.t_id, self.owner) + return u'ID: %s Owner: %s visits: %s' % (self.t_id, self.owner, self.visits) def create_token(self, owner_id, expiration_days, comment): q = Token( @@ -73,3 +74,12 @@ class Token(models.Model): ''' return Token.objects.filter(owner=assistant).order_by('-t_id')\ .filter(expires_at__gt=timezone.now()) + + def increment_visits(self, id): + token = Token.objects.filter(t_id=id) + + if not token: + return False + + token.update(visits=F('visits')+1) + return True diff --git a/webchat/views.py b/webchat/views.py index aec8135..f5b9aad 100644 --- a/webchat/views.py +++ b/webchat/views.py @@ -86,20 +86,25 @@ def chat(request, token): and did not expire. ''' - t = Token() - t_obj = get_object_or_404(Token, token=token) + requested_token = get_object_or_404(Token, token=token) # Make sure token didn't expire - if t_obj.expires_at < timezone.now(): + if requested_token.expires_at < timezone.now(): return render(request, "token_exp.html") params = { 'server': settings.CONFIG['server'], 'bosh': settings.CONFIG['bosh'], - 'receiver': t_obj.owner.username + settings.CONFIG['receiver'], - 'receiver_name': t_obj.owner.username, - 'token': token + 'receiver': + requested_token.owner.username + settings.CONFIG['receiver'], + 'receiver_name': requested_token.owner.username, + 'token': token, + 'comment': requested_token.comment } + + # Count visits for metrics + requested_token.increment_visits(requested_token.pk) + return render(request, 'prodromus.html', params)
[View Less]
1
0
0
0
[pups/master] Swapped variables for constants in prodromus.js
by lunar@torproject.org
11 Oct '14
11 Oct '14
commit 1de141d1c8602e2d6f0e9f5a7ac1495677286ef3 Author: Sherief Alaa <sheriefalaa.w(a)gmail.com> Date: Tue Jun 17 13:41:30 2014 +0300 Swapped variables for constants in prodromus.js --- static/js/prodromus.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/static/js/prodromus.js b/static/js/prodromus.js index ee9f7c7..7dbe826 100644 --- a/static/js/prodromus.js +++ b/static/js/prodromus.js @@ -42,9 +42,9 @@ * @license Affero General Public
…
[View More]
License */ -_assistantNotAvailable = 0 -_assistantAvailable = 1 -_serverError = 2 +const ASSISTANT_NOT_AVAILABLE = 0 +const ASSISTANT_AVAILABLE = 1 +const SERVER_ERROR = 2 var assisantStatus; var status_msg; @@ -227,7 +227,7 @@ Prodromus.actionhandler = { Prodromus.buildAndSendMessage( Prodromus.Util.htmlspecialchars( Prodromus.config.SENDERNAME ) + Prodromus.i18n.t9n( 'msg-hello' ) - , 'chat' + , 'chat' ); Prodromus.buildAndSendMessage("Token: " + Prodromus.config.TOKEN, 'chat', true); @@ -463,20 +463,20 @@ Prodromus.PresenceReporter = // Available if ( (presence_type === undefined) && (show === '' || show === 'chat') ) { - assisantStatus = _assistantAvailable; + assisantStatus = ASSISTANT_AVAILABLE; return true; } // Not Available if (presence_type === 'unavailable' || show === 'xa' || show === 'dnd' || 'away') { - assisantStatus = _assistantNotAvailable; + assisantStatus = ASSISTANT_NOT_AVAILABLE; return true; } } else { - assisantStatus = _serverError; + assisantStatus = SERVER_ERROR; } } return true; @@ -493,7 +493,7 @@ Prodromus.PresenceReporter = giveFeedback: function() { - if (assisantStatus !== _assistantAvailable) + if (assisantStatus !== ASSISTANT_AVAILABLE) { if (status_msg !== undefined) {
[View Less]
1
0
0
0
[pups/master] using django's slice instead of truncatechars
by lunar@torproject.org
11 Oct '14
11 Oct '14
commit 26969dfcf0cf5570b17e4820ba3d470293d413fd Author: Sherief Alaa <sheriefalaa.w(a)gmail.com> Date: Tue Jun 17 14:45:08 2014 +0300 using django's slice instead of truncatechars --- webchat/templates/tokens.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webchat/templates/tokens.html b/webchat/templates/tokens.html index a6f297f..20c3de1 100644 --- a/webchat/templates/tokens.html +++ b/webchat/templates/tokens.html @@ -48,7 +48,7 @@ <td>
…
[View More]
https://{{url}}/chat/{{token.token}}</td> <td>{{token.expires_at|date:"Y-m-d G:i"}}</td> <td class="comment" onclick="full_comment({{token.t_id}});"> - {{token.comment|truncatechars:35}} + {{token.comment|slice:":35"}} {% if token.comment|length > 35 %} <span data-toggle="modal" data-target="#comment-modal" style="color:blue; font-size:80%;"> more</span>
[View Less]
1
0
0
0
[pups/master] using .text() instead of .html() to prevent xss attacks
by lunar@torproject.org
11 Oct '14
11 Oct '14
commit 1b5b3d614ee2fddfaf046ca02059db5441ff2a91 Author: Sherief Alaa <sheriefalaa.w(a)gmail.com> Date: Tue Jun 17 13:44:43 2014 +0300 using .text() instead of .html() to prevent xss attacks --- webchat/templates/tokens.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/webchat/templates/tokens.html b/webchat/templates/tokens.html index db6ab73..a6f297f 100644 --- a/webchat/templates/tokens.html +++ b/webchat/templates/tokens.html @@ -9,15 +
…
[View More]
9,8 @@ <script type="text/javascript" src="/static/js/jquery.min.js"></script> <script src="/static/js/bootstrap.min.js"></script> <script type="text/javascript"> - $(document).ready (function (){ - $(".comment").html(function(){ - $(this).html($(this).text().substring(0,35) - + ' <span data-toggle="modal" data-target="#comment-modal" style="color:blue; font-size:80%;"> Read more..</span>'); - }); - }); - function full_comment(id){ - $(".comment-modal-body").html($("#full-comment-" + id).val()); + $(".comment-modal-body").text($("#full-comment-" + id).val()); } </script> {% endblock script %} @@ -54,7 +47,13 @@ <td><input name="selected_list" type="checkbox" value="{{token.token}}"></td> <td>https://{{url}}/chat/{{token.token}}</td> <td>{{token.expires_at|date:"Y-m-d G:i"}}</td> - <td class="comment" onclick="full_comment({{token.t_id}});">{{token.comment}}</td> + <td class="comment" onclick="full_comment({{token.t_id}});"> + {{token.comment|truncatechars:35}} + + {% if token.comment|length > 35 %} + <span data-toggle="modal" data-target="#comment-modal" style="color:blue; font-size:80%;"> more</span> + {% endif %} + </td> </tr> <input id="full-comment-{{token.t_id}}" type="hidden" value="{{token.comment}}"> {% endfor %}
[View Less]
1
0
0
0
[pups/master] Using @staticmethod instead of instantiating Token() objects
by lunar@torproject.org
11 Oct '14
11 Oct '14
commit ca32dabf87eb018af2886fe35cd6dfe561c12e70 Author: Sherief Alaa <sheriefalaa.w(a)gmail.com> Date: Sun Jun 22 00:43:25 2014 +0300 Using @staticmethod instead of instantiating Token() objects --- webchat/models.py | 10 +++++++--- webchat/views.py | 9 +++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/webchat/models.py b/webchat/models.py index 375ba04..6722aa1 100644 --- a/webchat/models.py +++ b/webchat/models.py @@ -41,7 +41,8 @@ class Token(
…
[View More]
models.Model): def __unicode__(self): return u'ID: %s Owner: %s visits: %s' % (self.t_id, self.owner, self.visits) - def create_token(self, owner_id, expiration_days, comment): + @staticmethod + def create_token(owner_id, expiration_days, comment): q = Token( owner=User.objects.get(id=owner_id), token=uuid.uuid4().hex, @@ -52,13 +53,15 @@ class Token(models.Model): return q.t_id is not None + @staticmethod def get_token(self, token): try: return Token.objects.get(token=token) except ObjectDoesNotExist: return [] - def revoke_tokens(self, token_list): + @staticmethod + def revoke_tokens(token_list): ''' Sets the expiration date equals to the creation date of a token or more ''' @@ -68,7 +71,8 @@ class Token(models.Model): .update(expires_at=F('created_at')) return True - def get_assistant_tokens(self, assistant): + @staticmethod + def get_assistant_tokens(assistant): ''' Returns a list of non-expired/revoked assistant's tokens ''' diff --git a/webchat/views.py b/webchat/views.py index f5b9aad..166e9be 100644 --- a/webchat/views.py +++ b/webchat/views.py @@ -32,7 +32,6 @@ from pups import settings @login_required def tokens_page(request): - token = Token() # Create one token if 'create_token' in request.POST: @@ -44,7 +43,7 @@ def tokens_page(request): params = { 'name': request.user.username, - 'tokens': token.get_assistant_tokens( + 'tokens': Token.get_assistant_tokens( User.objects.get(id=request.user.id)), 'url': settings.CONFIG['url'] } @@ -53,9 +52,8 @@ def tokens_page(request): def create_token(request): - token = Token() - if not token.create_token(request.user.id, + if not Token.create_token(request.user.id, settings.CONFIG['expiration_days'], request.POST.get('comment', '')): @@ -67,7 +65,6 @@ def create_token(request): def revoke_tokens(request): - token = Token() # If nothing was selected redirect and complain if len(request.POST.getlist("selected_list")) == 0: @@ -75,7 +72,7 @@ def revoke_tokens(request): return redirect('/tokens') # Revoke a token or more - token.revoke_tokens(request.POST.getlist("selected_list")) + Token.revoke_tokens(request.POST.getlist("selected_list")) messages.add_message(request, messages.INFO, fbm.revoke_success) return redirect('/tokens')
[View Less]
1
0
0
0
[pups/master] [#12625] Stops prodromus from eating http/https links
by lunar@torproject.org
11 Oct '14
11 Oct '14
commit dff26ee81d74a11a40a39d7b57e942e2f9fdebb5 Author: Sherief <sheriefalaa.w(a)gmail.com> Date: Thu Oct 2 01:07:59 2014 +0200 [#12625] Stops prodromus from eating http/https links The webchat UI previously ate http/https from links as a form of simplifying/beautifying urls but that proved bad when users copy/pasted logs so now it displays full links instead of simpler ones. --- static/js/prodromus.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
…
[View More]
diff --git a/static/js/prodromus.js b/static/js/prodromus.js index 7dbe826..29b2331 100644 --- a/static/js/prodromus.js +++ b/static/js/prodromus.js @@ -105,13 +105,7 @@ Prodromus.Util = { text = text.replace( /((https?\:\/\/|ftp\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi , function( url ) { - nice = url; - if( url.match( "^https?:\/\/" ) ) { - nice = nice.replace( /^https?:\/\//i, "" ) - } else { - url = 'http://'+url; - } - return '<a target="_blank" href="' + url + '">' + nice.replace( /^www./i, "" ) + '</a>'; + return '<a target="_blank" href="' + url + '">' + url + '</a>'; } );
[View Less]
1
0
0
0
[pups/master] using <a> instead of <span> for links
by lunar@torproject.org
11 Oct '14
11 Oct '14
commit bcf5711885f59502fa6627cf0cbfd05826a60344 Author: Sherief Alaa <sheriefalaa.w(a)gmail.com> Date: Sat Jun 21 22:38:46 2014 +0300 using <a> instead of <span> for links --- webchat/templates/tokens.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webchat/templates/tokens.html b/webchat/templates/tokens.html index 20c3de1..22f16ad 100644 --- a/webchat/templates/tokens.html +++ b/webchat/templates/tokens.html @@ -51,7 +51,7 @@ {{
…
[View More]
token.comment|slice:":35"}} {% if token.comment|length > 35 %} - <span data-toggle="modal" data-target="#comment-modal" style="color:blue; font-size:80%;"> more</span> + <a data-toggle="modal" data-target="#comment-modal" style="color:blue; font-size:80%;" href=""> more</a> {% endif %} </td> </tr>
[View Less]
1
0
0
0
[pups/master] removed Token.get_token()
by lunar@torproject.org
11 Oct '14
11 Oct '14
commit 3ef9187c2792162883e472fbd15f2c8f7644fe56 Author: Sherief Alaa <sheriefalaa.w(a)gmail.com> Date: Sun Jun 22 00:52:50 2014 +0300 removed Token.get_token() --- webchat/models.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/webchat/models.py b/webchat/models.py index 6722aa1..8d25021 100644 --- a/webchat/models.py +++ b/webchat/models.py @@ -54,13 +54,6 @@ class Token(models.Model): return q.t_id is not None @staticmethod - def get_token(self,
…
[View More]
token): - try: - return Token.objects.get(token=token) - except ObjectDoesNotExist: - return [] - - @staticmethod def revoke_tokens(token_list): ''' Sets the expiration date equals to the creation date of a token or more
[View Less]
1
0
0
0
[pups/master] [#12626] Fixes multi-line support in webchat
by lunar@torproject.org
11 Oct '14
11 Oct '14
commit fad8d3fedd274018fb6b9bad41c411bed550d34f Author: Sherief <sheriefalaa.w(a)gmail.com> Date: Mon Oct 6 01:46:31 2014 +0200 [#12626] Fixes multi-line support in webchat --- static/css/styles.css | 1 + static/js/prodromus.js | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index cebaba8..d4467eb 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -122,6 +122,7 @@ div#prodromus div#
…
[View More]
prodromus-log div.message span.msgText { font-weight: bold; background: #E0E1E1 url(../images/prodromus_bubble_content.png) left top no-repeat; padding: 0px 12px; + word-wrap: break-word; } div#prodromus div#prodromus-log div.message span.msgPerson { diff --git a/static/js/prodromus.js b/static/js/prodromus.js index 29b2331..4652ed1 100644 --- a/static/js/prodromus.js +++ b/static/js/prodromus.js @@ -175,10 +175,6 @@ Prodromus.actionhandler = { }, sendmessage: function() { - $('#prodromus-message').val( - $('#prodromus-message').val().replace(/\n/g,"").replace(/\r/g,"") - ); - if( $('#prodromus-message').val() != '' ) { Prodromus.buildAndSendMessage( $('#prodromus-message').val(), 'chat' ); $('#prodromus-message').val(''); @@ -546,4 +542,4 @@ function getStatus(status) if (connfail !== true) Prodromus.PresenceReporter.giveFeedback(); } -} \ No newline at end of file +}
[View Less]
1
0
0
0
[translation/tails-misc_completed] Update translations for tails-misc_completed
by translation@torproject.org
11 Oct '14
11 Oct '14
commit 5b1d7e3cd55741953447c8d1d15db4ba220eeef5 Author: Translation commit bot <translation(a)torproject.org> Date: Sat Oct 11 09:17:46 2014 +0000 Update translations for tails-misc_completed --- tails.pot | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tails.pot b/tails.pot index dbf4932..a5718aa 100644 --- a/tails.pot +++ b/tails.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: The Tor Project\n" "Report-Msgid-Bugs-To: \n" -"POT-
…
[View More]
Creation-Date: 2014-10-08 22:16+0200\n" -"PO-Revision-Date: 2014-10-10 08:51+0000\n" +"POT-Creation-Date: 2014-10-10 13:00+0200\n" +"PO-Revision-Date: 2014-10-11 08:52+0000\n" "Last-Translator: runasand <runa.sandvik(a)gmail.com>\n" "Language-Team: English (
http://www.transifex.com/projects/p/torproject/language/en/)\n
" "MIME-Version: 1.0\n" @@ -509,6 +509,14 @@ msgstr "Power Off" msgid "Immediately shut down computer" msgstr "Immediately shut down computer" +#: ../config/chroot_local-includes/usr/share/applications/tor-browser.desktop.in.h:1 +msgid "Tor Browser" +msgstr "Tor Browser" + +#: ../config/chroot_local-includes/usr/share/applications/tor-browser.desktop.in.h:2 +msgid "Anonymous Web Browser" +msgstr "Anonymous Web Browser" + #: ../config/chroot_local-includes/usr/share/applications/unsafe-browser.desktop.in.h:2 msgid "Browse the World Wide Web without anonymity" msgstr "Browse the World Wide Web without anonymity"
[View Less]
1
0
0
0
← Newer
1
...
110
111
112
113
114
115
116
...
156
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
Results per page:
10
25
50
100
200