Socket
Socket
Sign inDemoInstall

angular-mocks

Package Overview
Dependencies
0
Maintainers
2
Versions
105
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-mocks

AngularJS mocks for testing


Version published
Weekly downloads
183K
decreased by-0.8%
Maintainers
2
Install size
72.0 kB
Created
Weekly downloads
 

Changelog

Source

1.2.30 patronal-resurrection (2016-07-21)

Note: This release contains some security fixes that required breaking changes. Since the legacy 1.2.x branch is the only version branch that supports IE8, it was necessary to introduce a couple of low-impact breaking changes in a patch release - something we generally avoid - in order to make the fixes available to people that still need IE8 support.

Bug Fixes

  • $compile:
    • secure link[href] as a RESOURCE_URLs in $sce (f35f334b, #14687)
    • properly sanitize xlink:href attribute interpolation (f2fa1ed8, 2687c261)
  • ngSanitize: blacklist the attribute usemap as it can be used as a security exploit (ac0d5286, #14903)
  • ngAnimate: do not use event.timeStamp anymore for time tracking (8d83b563, #13494, #13495)

Breaking Changes

link[href] attributes are now protected via $sce, which prevents interpolated values that fail the RESOURCE_URL context tests from being used in interpolation. For example if the application is running at https://mydomain.org/ then the following will fail:

<link rel="stylesheet" href="{{ 'https://otherdomain.org/unsafe.css' }}" />

By default, RESOURCE_URL safe URLs are only allowed from the same domain and protocol as the application document. To use URLs from other domains and/or protocols, you may either whitelist them using $sceDelegateProvider.resourceUrlWhitelist(...) or wrap them into a trusted value by calling $sce.trustAsResourceUrl(url).

The $sanitize service will now remove instances of the usemap attribute from any elements passed to it.

This attribute is used to reference another element by name or id. Since the name and id attributes are already blacklisted, a sanitized usemap attribute could only reference unsanitized content, which is a security risk.

<a name="1.5.7"></a>

Readme

Source

packaged angular-mocks

This repo is for distribution on npm and bower. The source for this module is in the main AngularJS repo. Please file issues and pull requests against that repo.

Install

You can install this package either with npm or with bower.

npm

npm install angular-mocks

You can require ngMock modules:

var angular = require('angular');
angular.module('myMod', [
  require('angular-animate'),
  require('angular-mocks/ngMock'),
  require('angular-mocks/ngAnimateMock')
]);

bower

bower install angular-mocks

The mocks are then available at bower_components/angular-mocks/angular-mocks.js.

Documentation

Documentation is available on the AngularJS docs site.

License

The MIT License

Copyright (c) 2010-2015 Google, Inc. http://angularjs.org

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Last updated on 21 Jul 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc