Merge branch 'hotfix/0.4.1.1' into develop

Conflicts:
	Changelog.md
	config/defaults.yml
This commit is contained in:
Jonne Haß 2014-10-03 17:14:55 +02:00
commit 1959f0d939
3 changed files with 16 additions and 3 deletions

View file

@ -60,6 +60,10 @@ The default for including jQuery from a CDN has changed. If you want to continue
* Increase possible captcha length [#5169](https://github.com/diaspora/diaspora/pull/5169) * Increase possible captcha length [#5169](https://github.com/diaspora/diaspora/pull/5169)
* Display visibility icon in publisher aspects dropdown [#4982](https://github.com/diaspora/diaspora/pull/4982) * Display visibility icon in publisher aspects dropdown [#4982](https://github.com/diaspora/diaspora/pull/4982)
# 0.4.1.1
* Fix XSS issue in poll questions [#5274](https://github.com/diaspora/diaspora/issues/5274)
# 0.4.1.0 # 0.4.1.0
## New 'Terms of Service' feature and template ## New 'Terms of Service' feature and template

View file

@ -1,7 +1,7 @@
{{#if poll}} {{#if poll}}
<div class="poll_form"> <div class="poll_form">
<div class="row-fluid poll_head"> <div class="row-fluid poll_head">
<strong>{{{poll.question}}}</strong> <strong>{{poll.question}}</strong>
<div class="poll_statistic pull-right"> <div class="poll_statistic pull-right">
{{t "poll.count" count=poll.participation_count}} {{t "poll.count" count=poll.participation_count}}
</div> </div>

View file

@ -35,6 +35,15 @@ describe("app.views.Poll", function(){
}) })
}); });
describe("render", function() {
it("escapes the poll question", function() {
var question = "<script>alert(0);</script>";
this.view.poll.question = question;
this.view.render();
expect(this.view.$('.poll_head strong').text()).toBe(question);
});
});
describe("vote form", function(){ describe("vote form", function(){
it('show vote form when user is logged in and not voted before', function(){ it('show vote form when user is logged in and not voted before', function(){
expect(this.view.$('form').length).toBe(1); expect(this.view.$('form').length).toBe(1);