Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All websites dashboard lists website names double encoded #7817

Merged
merged 4 commits into from May 5, 2015
Merged

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented May 3, 2015

refs #7806

Should be XSS safe. We do HTML decode in the browser but when outputting it in the browser, it will be encoded again by AngularJS

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels May 3, 2015
@tsteur tsteur added this to the 2.13.1 milestone May 3, 2015
var createdSiteId = null;

before(function (done) {
var callback = function (undefined, response) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first argument to the callback will be an error (ie, it's a node.js style callback). If defined, you should call done(error) (where error is undefined renamed).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I understand.

Should I do something like this?

var callback = function (error, response) {
// ...
 done(error, response)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More like:

var callback = function (error, response) {
    if (error) {
        done(error);
        return;
    }

    ...

    done();
}

See: http://thenodeway.io/posts/understanding-error-first-callbacks/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, done

diosmosis added a commit that referenced this pull request May 5, 2015
Fixes #7806, fix All websites dashboard lists website names double encoded error.
@diosmosis diosmosis merged commit ccc4ffe into master May 5, 2015
@diosmosis diosmosis deleted the 7806 branch May 5, 2015 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants