Merge branch 'hotfix/0.5.5.1'
This commit is contained in:
commit
9cb4b732c6
6 changed files with 27 additions and 10 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
# 0.5.5.1
|
||||||
|
|
||||||
|
* Fix XSS on profile pages
|
||||||
|
* Bump nokogiri to fix several libxml2 CVEs, see http://www.ubuntu.com/usn/usn-2834-1/
|
||||||
|
|
||||||
# 0.5.5.0
|
# 0.5.5.0
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
|
|
||||||
2
Gemfile
2
Gemfile
|
|
@ -126,7 +126,7 @@ gem "messagebus_ruby_api", "1.0.3"
|
||||||
|
|
||||||
# Parsing
|
# Parsing
|
||||||
|
|
||||||
gem "nokogiri", "1.6.6.4"
|
gem "nokogiri", "1.6.7.1"
|
||||||
gem "redcarpet", "3.3.3"
|
gem "redcarpet", "3.3.3"
|
||||||
gem "twitter-text", "1.13.0"
|
gem "twitter-text", "1.13.0"
|
||||||
gem "roxml", "3.1.6"
|
gem "roxml", "3.1.6"
|
||||||
|
|
|
||||||
|
|
@ -433,7 +433,7 @@ GEM
|
||||||
method_source (0.8.2)
|
method_source (0.8.2)
|
||||||
mime-types (2.6.2)
|
mime-types (2.6.2)
|
||||||
mini_magick (4.3.6)
|
mini_magick (4.3.6)
|
||||||
mini_portile (0.6.2)
|
mini_portile2 (2.0.0)
|
||||||
minitest (5.8.2)
|
minitest (5.8.2)
|
||||||
mobile-fu (1.3.1)
|
mobile-fu (1.3.1)
|
||||||
rack-mobile-detect
|
rack-mobile-detect
|
||||||
|
|
@ -450,8 +450,8 @@ GEM
|
||||||
net-ssh (>= 2.6.5)
|
net-ssh (>= 2.6.5)
|
||||||
net-ssh (3.0.1)
|
net-ssh (3.0.1)
|
||||||
nio4r (1.1.1)
|
nio4r (1.1.1)
|
||||||
nokogiri (1.6.6.4)
|
nokogiri (1.6.7.1)
|
||||||
mini_portile (~> 0.6.0)
|
mini_portile2 (~> 2.0.0.rc2)
|
||||||
notiffany (0.0.8)
|
notiffany (0.0.8)
|
||||||
nenv (~> 0.1)
|
nenv (~> 0.1)
|
||||||
shellany (~> 0.0)
|
shellany (~> 0.0)
|
||||||
|
|
@ -813,7 +813,7 @@ DEPENDENCIES
|
||||||
minitest
|
minitest
|
||||||
mobile-fu (= 1.3.1)
|
mobile-fu (= 1.3.1)
|
||||||
mysql2 (= 0.3.20)
|
mysql2 (= 0.3.20)
|
||||||
nokogiri (= 1.6.6.4)
|
nokogiri (= 1.6.7.1)
|
||||||
omniauth (= 1.2.2)
|
omniauth (= 1.2.2)
|
||||||
omniauth-facebook (= 2.0.1)
|
omniauth-facebook (= 2.0.1)
|
||||||
omniauth-tumblr (= 1.1)
|
omniauth-tumblr (= 1.1)
|
||||||
|
|
|
||||||
|
|
@ -42,15 +42,15 @@ Handlebars.registerHelper('linkToPerson', function(context, block) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// relationship indicator for profile page
|
// relationship indicator for profile page
|
||||||
Handlebars.registerHelper('sharingMessage', function(person) {
|
Handlebars.registerHelper("sharingMessage", function(person) {
|
||||||
var i18n_scope = 'people.helper.is_not_sharing';
|
var i18nScope = "people.helper.is_not_sharing";
|
||||||
var icon = "circle";
|
var icon = "circle";
|
||||||
if( person.is_sharing ) {
|
if( person.is_sharing ) {
|
||||||
i18n_scope = 'people.helper.is_sharing';
|
i18nScope = "people.helper.is_sharing";
|
||||||
icon = "entypo check";
|
icon = "entypo check";
|
||||||
}
|
}
|
||||||
|
|
||||||
var title = Diaspora.I18n.t(i18n_scope, {name: person.name});
|
var title = Diaspora.I18n.t(i18nScope, {name: _.escape(person.name)});
|
||||||
var html = '<span class="sharing_message_container" title="'+title+'" data-placement="bottom">'+
|
var html = '<span class="sharing_message_container" title="'+title+'" data-placement="bottom">'+
|
||||||
' <i id="sharing_message" class="'+icon+'"></i>'+
|
' <i id="sharing_message" class="'+icon+'"></i>'+
|
||||||
'</span>';
|
'</span>';
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
version:
|
version:
|
||||||
number: "0.5.5.0" # Do not touch unless doing a release, do not backport the version number that's in master
|
number: "0.5.5.1" # Do not touch unless doing a release, do not backport the version number that's in master
|
||||||
heroku: false
|
heroku: false
|
||||||
environment:
|
environment:
|
||||||
url: "http://localhost:3000/"
|
url: "http://localhost:3000/"
|
||||||
|
|
|
||||||
12
spec/javascripts/app/helpers/handlebars-helpers_spec.js
Normal file
12
spec/javascripts/app/helpers/handlebars-helpers_spec.js
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
describe("Handlebars helpers", function() {
|
||||||
|
beforeEach(function() {
|
||||||
|
Diaspora.I18n.load({people: {helper: {"is_not_sharing": "<%= name %> is not sharing with you"}}});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("sharingMessage", function() {
|
||||||
|
it("escapes the person's name", function() {
|
||||||
|
var person = { name: "\"><script>alert(0)</script> \"><script>alert(0)</script>"};
|
||||||
|
expect(Handlebars.helpers.sharingMessage(person)).not.toMatch(/<script>/);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Reference in a new issue