Skip to content

Commit

Permalink
Add host, locale, user_agent to changeset tags (closes #2449)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhousel committed Mar 19, 2015
1 parent ace428c commit fbed61f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/id/core/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,15 @@ iD.Connection = function() {

connection.changesetTags = function(comment, imageryUsed) {
var tags = {
created_by: 'iD ' + iD.version,
host: (window.location.origin + window.location.pathname).substr(0, 255),
locale: iD.detect().locale,
user_agent: navigator.userAgent.substr(0, 255),

This comment has been minimized.

Copy link
@pnorman

pnorman Mar 19, 2015

Contributor

this might be leaking a bit too much private information

This comment has been minimized.

Copy link
@bhousel

bhousel Mar 20, 2015

Author Member

Yeah you are probably right.. I think by itself it wouldn't be a big deal, but linked to a person's username and in a public database, not good. I'll take it out.

This comment has been minimized.

Copy link
@pnorman

pnorman Mar 20, 2015

Contributor

the User Agent is actually personally identifiable information. Browser and major version might be okay, and equivalent to JOSM's OS reporting

This comment has been minimized.

Copy link
@bhousel

bhousel Mar 20, 2015

Author Member

agree... headed to bed, but will probably add this tomorrow.

imagery_used: imageryUsed.join(';').substr(0, 255),
created_by: 'iD ' + iD.version
};

if (comment) {
tags.comment = comment;
tags.comment = comment.substr(0, 255);

This comment has been minimized.

Copy link
@pnorman

pnorman Mar 20, 2015

Contributor

does the UI prevent entering more than 256 chars?

This comment has been minimized.

Copy link
@bhousel

bhousel Mar 20, 2015

Author Member

yes but I don't want to rely on that UI check, in case we decouple the core stuff into a module someday.

}

return tags;
Expand Down

0 comments on commit fbed61f

Please sign in to comment.