katello 4.0.3 → 4.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +0 -33
- data/app/assets/stylesheets/katello/contents.scss +1 -1
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +5 -11
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -9
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -24
- data/app/controllers/katello/api/v2/api_controller.rb +15 -3
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +1 -8
- data/app/controllers/katello/api/v2/content_exports_controller.rb +1 -14
- data/app/controllers/katello/api/v2/content_imports_controller.rb +38 -15
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +22 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +6 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +2 -59
- data/app/controllers/katello/api/v2/content_views_controller.rb +3 -58
- data/app/controllers/katello/api/v2/host_errata_controller.rb +7 -6
- data/app/controllers/katello/api/v2/host_packages_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +18 -22
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +16 -16
- data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
- data/app/controllers/katello/api/v2/package_groups_controller.rb +4 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +13 -12
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +50 -4
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +7 -1
- data/app/controllers/katello/concerns/api/api_controller.rb +10 -0
- data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +46 -0
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +8 -0
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +31 -22
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +0 -8
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +34 -0
- data/app/helpers/katello/katello_urls_helper.rb +23 -0
- data/app/lib/actions/candlepin/owner/import.rb +10 -3
- data/app/lib/actions/candlepin/product/content_update.rb +1 -1
- data/app/lib/actions/foreman/environment/destroy.rb +2 -2
- data/app/lib/actions/katello/agent_action.rb +1 -6
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +0 -7
- data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -2
- data/app/lib/actions/katello/content_view/add_to_environment.rb +9 -7
- data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -10
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +2 -3
- data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -4
- data/app/lib/actions/katello/content_view/publish.rb +21 -31
- data/app/lib/actions/katello/content_view_environment/destroy.rb +0 -5
- data/app/lib/actions/katello/content_view_version/auto_create_products.rb +22 -0
- data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +22 -0
- data/app/lib/actions/katello/content_view_version/destroy.rb +0 -10
- data/app/lib/actions/katello/content_view_version/export.rb +20 -22
- data/app/lib/actions/katello/content_view_version/import.rb +27 -13
- data/app/lib/actions/katello/content_view_version/import_library.rb +4 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +12 -67
- data/app/lib/actions/katello/content_view_version/republish_repositories.rb +0 -4
- data/app/lib/actions/katello/content_view_version/reset_content_view_repositories_from_metadata.rb +11 -0
- data/app/lib/actions/katello/foreman/content_update.rb +0 -3
- data/app/lib/actions/katello/host/auto_attach_subscriptions.rb +0 -4
- data/app/lib/actions/katello/organization/manifest_import.rb +7 -1
- data/app/lib/actions/katello/organization/manifest_refresh.rb +28 -7
- data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +2 -2
- data/app/lib/actions/katello/product/create.rb +0 -1
- data/app/lib/actions/katello/repository/check_matching_content.rb +4 -3
- data/app/lib/actions/katello/repository/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/discover.rb +1 -1
- data/app/lib/actions/katello/repository/filtered_index_content.rb +1 -4
- data/app/lib/actions/katello/repository/import_upload.rb +0 -1
- data/app/lib/actions/katello/repository/update.rb +0 -1
- data/app/lib/actions/middleware/record_smart_proxy_sync_history.rb +0 -5
- data/app/lib/actions/pulp/repository/create.rb +1 -7
- data/app/lib/actions/pulp/repository/distributor_publish.rb +2 -10
- data/app/lib/actions/pulp/repository/sync.rb +1 -3
- data/app/lib/actions/pulp3/capsule_content/refresh_content_guard.rb +17 -0
- data/app/lib/actions/pulp3/content_guard/refresh.rb +10 -6
- data/app/lib/actions/pulp3/content_view_version/create_export_history.rb +57 -0
- data/app/lib/actions/pulp3/content_view_version/create_import_history.rb +34 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +2 -3
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +34 -51
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +2 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +13 -1
- data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -0
- data/app/lib/actions/pulp3/repository/refresh_remote.rb +17 -0
- data/app/lib/katello/agent/client_message_handler.rb +3 -11
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +117 -3
- data/app/lib/katello/errors.rb +6 -11
- data/app/lib/katello/event_daemon/monitor.rb +0 -1
- data/app/lib/katello/event_daemon/runner.rb +2 -2
- data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +10 -6
- data/app/lib/katello/http_resource.rb +1 -6
- data/app/lib/katello/logging.rb +11 -6
- data/app/lib/katello/qpid/connection.rb +1 -3
- data/app/lib/katello/repo_discovery.rb +15 -1
- data/app/lib/katello/resources/candlepin/owner.rb +3 -2
- data/app/lib/katello/resources/candlepin/pool.rb +6 -2
- data/app/lib/katello/resources/candlepin.rb +10 -0
- data/app/lib/katello/util/package.rb +1 -1
- data/app/lib/katello/util/pulpcore_content_filters.rb +1 -1
- data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +0 -6
- data/app/models/katello/authorization/content_view.rb +8 -0
- data/app/models/katello/authorization/content_view_version_import_history.rb +11 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -1
- data/app/models/katello/concerns/content_view_filter_rule_common.rb +2 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +1 -32
- data/app/models/katello/concerns/hostgroup_extensions.rb +2 -9
- data/app/models/katello/concerns/http_proxy_extensions.rb +2 -4
- data/app/models/katello/concerns/location_extensions.rb +2 -25
- data/app/models/katello/concerns/operatingsystem_extensions.rb +0 -2
- data/app/models/katello/concerns/organization_extensions.rb +4 -18
- data/app/models/katello/concerns/redhat_extensions.rb +10 -18
- data/app/models/katello/concerns/smart_proxy_extensions.rb +6 -31
- data/app/models/katello/content_view.rb +17 -113
- data/app/models/katello/content_view_component.rb +5 -0
- data/app/models/katello/content_view_docker_filter_rule.rb +1 -0
- data/app/models/katello/content_view_package_filter_rule.rb +4 -0
- data/app/models/katello/content_view_package_group_filter.rb +1 -0
- data/app/models/katello/content_view_repository.rb +4 -5
- data/app/models/katello/content_view_version.rb +9 -33
- data/app/models/katello/content_view_version_export_history.rb +18 -4
- data/app/models/katello/content_view_version_import_history.rb +42 -0
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/events/delete_pool.rb +19 -0
- data/app/models/katello/glue/candlepin/environment.rb +7 -0
- data/app/models/katello/glue/candlepin/owner.rb +12 -1
- data/app/models/katello/glue/candlepin/pool.rb +42 -25
- data/app/models/katello/glue/provider.rb +3 -6
- data/app/models/katello/glue/pulp/repo.rb +19 -9
- data/app/models/katello/host/content_facet.rb +1 -0
- data/app/models/katello/host/subscription_facet.rb +3 -1
- data/app/models/katello/kt_environment.rb +0 -6
- data/app/models/katello/package_group.rb +4 -0
- data/app/models/katello/ping.rb +15 -4
- data/app/models/katello/pool.rb +9 -0
- data/app/models/katello/product.rb +0 -6
- data/app/models/katello/product_content.rb +3 -1
- data/app/models/katello/pulp_sync_status.rb +0 -10
- data/app/models/katello/repository.rb +20 -35
- data/app/models/katello/root_repository.rb +0 -5
- data/app/models/katello/subscription.rb +10 -0
- data/app/models/katello/sync_plan.rb +7 -0
- data/app/models/setting/content.rb +7 -8
- data/app/presenters/katello/content_view_version_compare_presenter.rb +2 -6
- data/app/presenters/katello/product_content_presenter.rb +3 -5
- data/app/services/cert/certs.rb +3 -7
- data/app/services/katello/applicability/applicable_content_helper.rb +1 -2
- data/app/services/katello/candlepin/event_handler.rb +22 -22
- data/app/services/katello/candlepin/message_handler.rb +24 -15
- data/app/services/katello/content_view_manager.rb +24 -0
- data/app/services/katello/event_monitor/poller_thread.rb +25 -20
- data/app/services/katello/managed_content_medium_provider.rb +4 -0
- data/app/services/katello/organization_creator.rb +120 -0
- data/app/services/katello/product_content_finder.rb +5 -1
- data/app/services/katello/pulp/pulp_content_unit.rb +6 -6
- data/app/services/katello/pulp/smart_proxy_repository.rb +2 -17
- data/app/services/katello/pulp3/api/ansible_collection.rb +14 -2
- data/app/services/katello/pulp3/api/apt.rb +1 -1
- data/app/services/katello/pulp3/api/content_guard.rb +6 -40
- data/app/services/katello/pulp3/api/core.rb +27 -2
- data/app/services/katello/pulp3/api/docker.rb +1 -1
- data/app/services/katello/pulp3/api/file.rb +5 -1
- data/app/services/katello/pulp3/api/yum.rb +9 -1
- data/app/services/katello/pulp3/content_view_version/export.rb +18 -40
- data/app/services/katello/pulp3/content_view_version/import.rb +75 -30
- data/app/services/katello/pulp3/content_view_version/import_gpg_keys.rb +32 -0
- data/app/services/katello/pulp3/content_view_version/import_validator.rb +53 -21
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +47 -0
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +52 -0
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +99 -0
- data/app/services/katello/pulp3/pulp_content_unit.rb +1 -1
- data/app/services/katello/pulp3/repository/ansible_collection.rb +5 -1
- data/app/services/katello/pulp3/repository/apt.rb +2 -1
- data/app/services/katello/pulp3/repository/yum.rb +0 -16
- data/app/services/katello/pulp3/repository.rb +20 -1
- data/app/services/katello/pulp3/rpm.rb +5 -1
- data/app/services/katello/pulp3/task.rb +12 -5
- data/app/services/katello/pulp3/task_group.rb +10 -5
- data/app/services/katello/smart_proxy_helper.rb +1 -8
- data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +0 -1
- data/app/services/katello/ui_notifications/system_error.rb +25 -0
- data/app/views/katello/api/v2/content_view_components/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_filters/show.json.rabl +0 -1
- data/app/views/katello/api/v2/{puppet_modules → content_view_version_import_histories}/index.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_version_import_histories/show.json.rabl +14 -0
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +2 -2
- data/app/views/katello/api/v2/content_view_versions/show.json.rabl +0 -7
- data/app/views/katello/api/v2/content_views/base.json.rabl +20 -9
- data/app/views/katello/api/v2/environments/show.json.rabl +0 -1
- data/app/views/katello/api/v2/package_groups/index.json.rabl +4 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +0 -1
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repository_sets/index.json.rabl +4 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +22 -0
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -1
- data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +1 -1
- data/app/views/overrides/smart_proxies/_download_policy.erb +1 -1
- data/config/initializers/monkeys.rb +0 -1
- data/config/katello.yaml.example +0 -1
- data/config/routes/api/v2.rb +9 -21
- data/config/routes/overrides.rb +1 -2
- data/db/migrate/20140422000001_update_products_add_organization.rb +3 -2
- data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +2 -0
- data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +1 -1
- data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +14 -20
- data/db/migrate/20210224160921_remove_disabled_products_from_sync_plans.rb +6 -0
- data/db/migrate/20210302165636_remove_katello_puppet_modules.rb +62 -0
- data/db/migrate/20210309160925_create_katello_content_view_version_import_histories.rb +13 -0
- data/db/migrate/20210318204533_add_import_type_to_import_histories.rb +8 -0
- data/db/migrate/20210319123300_add_foreign_keys_to_import_export_histories.rb +6 -0
- data/db/migrate/20210322142311_add_auth_url_token_to_root_repositories.rb +6 -0
- data/db/migrate/20210331180353_katello_pool_organization_id_not_nullable.rb +16 -0
- data/db/migrate/20210409033915_add_created_in_katello_to_taxonomy.rb +9 -0
- data/db/seeds.d/101-locations.rb +0 -3
- data/db/seeds.d/102-organizations.rb +1 -5
- data/db/seeds.d/109-katello-notification-blueprints.rb +12 -0
- data/db/seeds.d/111-upgrade_tasks.rb +3 -2
- data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +325 -156
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-animate/angular-animate.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-resource/angular-resource.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-route/angular-route.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-sanitize/angular-sanitize.js +21 -43
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +9 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +2 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +11 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +18 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +10 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-actions.controller.js +5 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +14 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +0 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +9 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +2 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +3 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-view.factory.js +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -56
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +2 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +2 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +21 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +71 -311
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +0 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +13 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +21 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -6
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +3 -3
- data/lib/katello/engine.rb +16 -15
- data/lib/katello/middleware/organization_created_enforcer.rb +22 -0
- data/lib/katello/permission_creator.rb +12 -28
- data/lib/katello/permissions/host_permissions.rb +3 -2
- data/lib/katello/plugin.rb +6 -19
- data/lib/katello/repository_types/ansible_collection.rb +1 -1
- data/lib/katello/repository_types/deb.rb +1 -1
- data/lib/katello/repository_types/docker.rb +1 -1
- data/lib/katello/repository_types/file.rb +1 -1
- data/lib/katello/repository_types/yum.rb +1 -1
- data/lib/katello/tasks/clean_backend_objects.rake +25 -0
- data/lib/katello/tasks/jenkins.rake +6 -0
- data/lib/katello/tasks/receptor/extract_orgs.rake +1 -3
- data/lib/katello/tasks/reimport.rake +0 -1
- data/lib/katello/tasks/repository.rake +0 -30
- data/lib/katello/tasks/update_subscription_facet_backend_data.rake +3 -3
- data/lib/katello/tasks/upgrades/4.0/remove_ostree_puppet_content.rake +2 -4
- data/lib/katello/tasks/upgrades/4.1/fix_invalid_pools.rake +62 -0
- data/lib/katello/tasks/upgrades/4.1/sync_noarch_content.rake +15 -0
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +1 -1
- data/locale/action_names.rb +65 -63
- data/locale/bn/katello.edit.po +1357 -1606
- data/locale/bn/katello.po +465 -744
- data/locale/cs/katello.edit.po +1213 -1087
- data/locale/cs/katello.po +307 -219
- data/locale/de/katello.edit.po +1498 -1520
- data/locale/de/katello.po +589 -625
- data/locale/en/katello.edit.po +1198 -1074
- data/locale/en/katello.po +304 -213
- data/locale/es/katello.edit.po +2344 -2304
- data/locale/es/katello.po +1407 -1407
- data/locale/fr/katello.edit.po +2720 -2642
- data/locale/fr/katello.po +1703 -1750
- data/locale/gu/katello.edit.po +1546 -1797
- data/locale/gu/katello.po +654 -935
- data/locale/hi/katello.edit.po +1545 -1793
- data/locale/hi/katello.po +653 -931
- data/locale/it/katello.edit.po +1323 -1310
- data/locale/it/katello.po +407 -409
- data/locale/ja/katello.edit.po +2645 -2557
- data/locale/ja/katello.po +1646 -1664
- data/locale/katello.pot +1435 -1289
- data/locale/kn/katello.edit.po +1546 -1795
- data/locale/kn/katello.po +654 -933
- data/locale/ko/katello.edit.po +1464 -1449
- data/locale/ko/katello.po +554 -554
- data/locale/mr/katello.edit.po +1545 -1758
- data/locale/mr/katello.po +653 -896
- data/locale/or/katello.edit.po +1546 -1795
- data/locale/or/katello.po +654 -933
- data/locale/pa/katello.edit.po +1541 -1775
- data/locale/pa/katello.po +649 -913
- data/locale/pt/katello.edit.po +1289 -1255
- data/locale/pt/katello.po +398 -394
- data/locale/pt_BR/katello.edit.po +2370 -2315
- data/locale/pt_BR/katello.po +1435 -1421
- data/locale/ru/katello.edit.po +1611 -1608
- data/locale/ru/katello.po +704 -716
- data/locale/ta/katello.edit.po +1358 -1605
- data/locale/ta/katello.po +465 -742
- data/locale/te/katello.edit.po +1545 -1792
- data/locale/te/katello.po +653 -930
- data/locale/zh_CN/katello.edit.po +3052 -2930
- data/locale/zh_CN/katello.po +2055 -2039
- data/locale/zh_TW/katello.edit.po +1571 -1669
- data/locale/zh_TW/katello.po +649 -777
- data/package.json +2 -2
- data/webpack/{scenes/ContentViews/Details/Repositories/RepoAddedStatus.js → components/AddedStatusLabel.js} +5 -5
- data/webpack/components/RoutedTabs/RoutedTabs.js +91 -0
- data/webpack/components/RoutedTabs/__tests__/RoutedTabs.test.js +32 -0
- data/webpack/components/RoutedTabs/index.js +4 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageConstants.js +2 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js +21 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageSelectors.js +21 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/ActivationKeys.test.js +18 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/Force.test.js +9 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/IgnoreSubmanErrors.test.js +9 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/LifeCycleEnvironment.test.js +11 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +58 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +25 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/IgnoreSubmanErrors.test.js.snap +25 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +27 -0
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +99 -0
- data/webpack/components/extensions/RegistrationCommands/fields/Force.js +38 -0
- data/webpack/components/extensions/RegistrationCommands/fields/IgnoreSubmanErrors.js +38 -0
- data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +56 -0
- data/webpack/components/extensions/RegistrationCommands/index.js +81 -0
- data/webpack/components/pf3Table/formatters/EntitlementsInlineEditFormatter.js +23 -24
- data/webpack/components/pf3Table/formatters/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +3 -1
- data/webpack/components/pf3Table/formatters/entitlementsValueFormatter.js +16 -0
- data/webpack/containers/Application/overrides.scss +3 -0
- data/webpack/fills_index.js +3 -0
- data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +0 -2
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +8 -1
- data/webpack/scenes/ContentViews/Copy/__tests__/contentViewCopyResult.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Create/__tests__/contentViewCreateResult.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +28 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +45 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +124 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +161 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +163 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/unpublishedCVComponents.fixtures.json +64 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +67 -7
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +61 -4
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +34 -11
- data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +33 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +117 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +115 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentType.js +7 -10
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetails.js +49 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +56 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +3 -17
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +116 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/allFilterPackageGroups.fixtures.json +69 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetail.fixtures.json +103 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +116 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json +147 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterRules.fixtures.json +30 -0
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +136 -0
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.fixtures.json +370 -0
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +94 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +0 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +106 -13
- data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +11 -5
- data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +5 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +138 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewRepoAdd.fixture.json +57 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +73 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionEnvironments.js +31 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.js +64 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.scss +8 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionPackages.js +0 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +105 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +728 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +154 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/emptyCVVersion.fixtures.json +13 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -1
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Table/ContentViewVersionCell.js +33 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +17 -22
- data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +51 -102
- data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +5 -3
- data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +30 -5
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +95 -0
- data/webpack/scenes/ContentViews/components/ContentViewIcon.js +11 -5
- data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +16 -0
- data/webpack/scenes/ContentViews/components/IconWithCount.js +1 -1
- data/webpack/scenes/ContentViews/components/InactiveText.js +15 -0
- data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +19 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionPurposeAttributes.js +1 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +1 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +17 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +144 -0
- data/webpack/scenes/Tasks/helpers.js +2 -2
- data/webpack/test-utils/react-testing-lib-wrapper.js +11 -3
- data/webpack/utils/__tests__/useParamsWithHash.test.js +22 -0
- data/webpack/utils/helpers.js +2 -0
- data/webpack/utils/paramsFromHash.js +16 -0
- data/webpack/utils/useUrlParams.js +14 -0
- metadata +122 -206
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +0 -82
- data/app/controllers/katello/api/v2/puppet_modules_controller.rb +0 -19
- data/app/controllers/katello/concerns/registration_controller_extensions.rb +0 -16
- data/app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb +0 -20
- data/app/lib/actions/candlepin/owner/create.rb +0 -16
- data/app/lib/actions/katello/content_view_puppet_environment/clear.rb +0 -11
- data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +0 -78
- data/app/lib/actions/katello/content_view_puppet_environment/clone_content_for_version.rb +0 -20
- data/app/lib/actions/katello/content_view_puppet_environment/create.rb +0 -34
- data/app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb +0 -23
- data/app/lib/actions/katello/content_view_puppet_environment/destroy.rb +0 -28
- data/app/lib/actions/katello/content_view_puppet_module/destroy.rb +0 -46
- data/app/lib/actions/katello/environment/library_create.rb +0 -35
- data/app/lib/actions/katello/organization/create.rb +0 -38
- data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +0 -36
- data/app/lib/actions/pulp/content_view_puppet_environment/index_content.rb +0 -19
- data/app/lib/actions/pulp/repository/presenters/puppet_presenter.rb +0 -54
- data/app/lib/actions/pulp3/content_migration.rb +0 -31
- data/app/lib/actions/pulp3/content_migration_presenter.rb +0 -59
- data/app/lib/actions/pulp3/content_migration_reset.rb +0 -22
- data/app/lib/katello/foreman.rb +0 -32
- data/app/lib/katello/mapping.rb +0 -31
- data/app/lib/katello/util/hostgroup_facets_helper.rb +0 -126
- data/app/lib/katello/validators/content_view_puppet_module_validator.rb +0 -32
- data/app/models/katello/concerns/environment_extensions.rb +0 -74
- data/app/models/katello/content_view_puppet_environment.rb +0 -116
- data/app/models/katello/content_view_puppet_environment_puppet_module.rb +0 -11
- data/app/models/katello/content_view_puppet_module.rb +0 -63
- data/app/models/katello/puppet_module.rb +0 -77
- data/app/models/katello/repository_puppet_module.rb +0 -7
- data/app/services/katello/pulp/puppet_module.rb +0 -21
- data/app/services/katello/pulp/repository/puppet.rb +0 -68
- data/app/services/katello/pulp3/migration.rb +0 -329
- data/app/services/katello/pulp3/migration_plan.rb +0 -178
- data/app/services/katello/pulp3/migration_switchover.rb +0 -126
- data/app/services/katello/puppet_class_importer_extensions.rb +0 -32
- data/app/views/foreman/hosts/_registration.html.erb +0 -12
- data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +0 -30
- data/app/views/katello/api/v2/content_view_puppet_modules/create.json.rabl +0 -3
- data/app/views/katello/api/v2/content_view_puppet_modules/index.json.rabl +0 -7
- data/app/views/katello/api/v2/content_view_puppet_modules/show.json.rabl +0 -9
- data/app/views/katello/api/v2/content_views/puppet_modules.json.rabl +0 -7
- data/app/views/katello/api/v2/host_subscriptions/content_override.json.rabl +0 -3
- data/app/views/katello/api/v2/host_subscriptions/product_content.json.rabl +0 -29
- data/app/views/katello/api/v2/puppet_modules/backend.json.rabl +0 -7
- data/app/views/katello/api/v2/puppet_modules/base.json.rabl +0 -9
- data/app/views/katello/api/v2/puppet_modules/compare.json.rabl +0 -10
- data/app/views/katello/api/v2/puppet_modules/name.json.rabl +0 -3
- data/app/views/katello/api/v2/puppet_modules/names.json.rabl +0 -7
- data/app/views/katello/api/v2/puppet_modules/show.json.rabl +0 -4
- data/db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-client.directive.js +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-os-client.directive.js +0 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register.controller.js +0 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-deb-client.html +0 -38
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-oracle-client.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-sles-client.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-puppet-modules.controller.js +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-names.controller.js +0 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +0 -61
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module.factory.js +0 -23
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +0 -74
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-names.html +0 -57
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-versions.html +0 -64
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-modules.html +0 -54
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-puppet-modules.html +0 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-puppet-modules.html +0 -25
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +0 -6903
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +0 -7094
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +0 -7303
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +0 -6895
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +0 -6865
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +0 -6720
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +0 -7077
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +0 -6832
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +0 -6766
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +0 -6703
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-puppet-modules.html +0 -66
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-content-views.controller.js +0 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-repositories.controller.js +0 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module.controller.js +0 -34
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-content-views.html +0 -41
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-info.html +0 -32
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-repositories.html +0 -52
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module.html +0 -37
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-module.factory.js +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.controller.js +0 -35
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.module.js +0 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.routes.js +0 -71
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/views/puppet-modules.html +0 -47
- data/lib/katello/repository_types/puppet.rb +0 -5
- data/lib/katello/tasks/fix_hostgroup_facets.rake +0 -8
- data/lib/katello/tasks/pulp3_content_switchover.rake +0 -32
- data/lib/katello/tasks/pulp3_migration.rake +0 -41
- data/lib/katello/tasks/pulp3_migration_abort.rake +0 -22
- data/lib/katello/tasks/pulp3_migration_reset.rake +0 -26
- data/lib/katello/tasks/pulp3_migration_stats.rake +0 -41
- data/lib/katello/tasks/pulp3_post_migration_check.rake +0 -51
- data/lib/monkeys/passenger_tee_input.rb +0 -20
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/webpack/components/TabWrapper/TabWrapper.js +0 -26
- data/webpack/components/TabWrapper/index.js +0 -3
- data/webpack/components/TabbedView/TabbedView.js +0 -38
- data/webpack/components/TabbedView/TabbedView.scss +0 -3
- data/webpack/components/TabbedView/index.js +0 -3
- data/webpack/scenes/ContentViews/expansions/EnvironmentsExpansion.js +0 -19
- data/webpack/scenes/ContentViews/expansions/VersionsExpansion.js +0 -11
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.
|
3
|
-
* (c) 2010-
|
2
|
+
* @license AngularJS v1.8.2
|
3
|
+
* (c) 2010-2020 Google LLC. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
(function(window) {'use strict';
|
@@ -37,7 +37,7 @@ var minErrConfig = {
|
|
37
37
|
* non-positive or non-numeric value, removes the max depth limit.
|
38
38
|
* Default: 5
|
39
39
|
*
|
40
|
-
* * `urlErrorParamsEnabled` **{Boolean}** - Specifies
|
40
|
+
* * `urlErrorParamsEnabled` **{Boolean}** - Specifies whether the generated error url will
|
41
41
|
* contain the parameters of the thrown error. Disabling the parameters can be useful if the
|
42
42
|
* generated error url is very long.
|
43
43
|
*
|
@@ -87,7 +87,7 @@ function isValidObjectMaxDepth(maxDepth) {
|
|
87
87
|
* Since data will be parsed statically during a build step, some restrictions
|
88
88
|
* are applied with respect to how minErr instances are created and called.
|
89
89
|
* Instances should have names of the form namespaceMinErr for a minErr created
|
90
|
-
* using minErr('namespace')
|
90
|
+
* using minErr('namespace'). Error codes, namespaces and template strings
|
91
91
|
* should all be static strings, not variables or general expressions.
|
92
92
|
*
|
93
93
|
* @param {string} module The namespace to use for the new minErr instance.
|
@@ -99,7 +99,7 @@ function isValidObjectMaxDepth(maxDepth) {
|
|
99
99
|
function minErr(module, ErrorConstructor) {
|
100
100
|
ErrorConstructor = ErrorConstructor || Error;
|
101
101
|
|
102
|
-
var url = 'https://errors.angularjs.org/1.
|
102
|
+
var url = 'https://errors.angularjs.org/1.8.2/';
|
103
103
|
var regex = url.replace('.', '\\.') + '[\\s\\S]*';
|
104
104
|
var errRegExp = new RegExp(regex, 'g');
|
105
105
|
|
@@ -232,6 +232,7 @@ function minErr(module, ErrorConstructor) {
|
|
232
232
|
hasOwnProperty,
|
233
233
|
createMap,
|
234
234
|
stringify,
|
235
|
+
UNSAFE_restoreLegacyJqLiteXHTMLReplacement,
|
235
236
|
|
236
237
|
NODE_TYPE_ELEMENT,
|
237
238
|
NODE_TYPE_ATTRIBUTE,
|
@@ -959,8 +960,8 @@ function arrayRemove(array, value) {
|
|
959
960
|
* - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream)
|
960
961
|
* - [`Set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)
|
961
962
|
* - [`WeakMap`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)
|
962
|
-
* - [
|
963
|
-
* [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set)
|
963
|
+
* - [`getter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get)/
|
964
|
+
* [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set)
|
964
965
|
*
|
965
966
|
* @param {*} source The source that will be used to make a copy. Can be any type, including
|
966
967
|
* primitives, `null`, and `undefined`.
|
@@ -1670,7 +1671,7 @@ function allowAutoBootstrap(document) {
|
|
1670
1671
|
link.href = src.value;
|
1671
1672
|
|
1672
1673
|
if (document.location.origin === link.origin) {
|
1673
|
-
// Same-origin resources are always allowed, even for
|
1674
|
+
// Same-origin resources are always allowed, even for banned URL schemes.
|
1674
1675
|
return true;
|
1675
1676
|
}
|
1676
1677
|
// Disabled bootstrapping unless angular.js was loaded from a known scheme used on the web.
|
@@ -2088,6 +2089,26 @@ function bindJQuery() {
|
|
2088
2089
|
bindJQueryFired = true;
|
2089
2090
|
}
|
2090
2091
|
|
2092
|
+
/**
|
2093
|
+
* @ngdoc function
|
2094
|
+
* @name angular.UNSAFE_restoreLegacyJqLiteXHTMLReplacement
|
2095
|
+
* @module ng
|
2096
|
+
* @kind function
|
2097
|
+
*
|
2098
|
+
* @description
|
2099
|
+
* Restores the pre-1.8 behavior of jqLite that turns XHTML-like strings like
|
2100
|
+
* `<div /><span />` to `<div></div><span></span>` instead of `<div><span></span></div>`.
|
2101
|
+
* The new behavior is a security fix. Thus, if you need to call this function, please try to adjust
|
2102
|
+
* your code for this change and remove your use of this function as soon as possible.
|
2103
|
+
|
2104
|
+
* Note that this only patches jqLite. If you use jQuery 3.5.0 or newer, please read the
|
2105
|
+
* [jQuery 3.5 upgrade guide](https://jquery.com/upgrade-guide/3.5/) for more details
|
2106
|
+
* about the workarounds.
|
2107
|
+
*/
|
2108
|
+
function UNSAFE_restoreLegacyJqLiteXHTMLReplacement() {
|
2109
|
+
JQLite.legacyXHTMLReplacement = true;
|
2110
|
+
}
|
2111
|
+
|
2091
2112
|
/**
|
2092
2113
|
* throw error if the argument is falsy.
|
2093
2114
|
*/
|
@@ -2807,11 +2828,11 @@ function toDebugString(obj, maxDepth) {
|
|
2807
2828
|
var version = {
|
2808
2829
|
// These placeholder strings will be replaced by grunt's `build` task.
|
2809
2830
|
// They need to be double- or single-quoted.
|
2810
|
-
full: '1.
|
2831
|
+
full: '1.8.2',
|
2811
2832
|
major: 1,
|
2812
|
-
minor:
|
2813
|
-
dot:
|
2814
|
-
codeName: '
|
2833
|
+
minor: 8,
|
2834
|
+
dot: 2,
|
2835
|
+
codeName: 'meteoric-mining'
|
2815
2836
|
};
|
2816
2837
|
|
2817
2838
|
|
@@ -2844,6 +2865,7 @@ function publishExternalAPI(angular) {
|
|
2844
2865
|
'callbacks': {$$counter: 0},
|
2845
2866
|
'getTestability': getTestability,
|
2846
2867
|
'reloadWithDebugInfo': reloadWithDebugInfo,
|
2868
|
+
'UNSAFE_restoreLegacyJqLiteXHTMLReplacement': UNSAFE_restoreLegacyJqLiteXHTMLReplacement,
|
2847
2869
|
'$$minErr': minErr,
|
2848
2870
|
'$$csp': csp,
|
2849
2871
|
'$$encodeUriSegment': encodeUriSegment,
|
@@ -2961,7 +2983,7 @@ function publishExternalAPI(angular) {
|
|
2961
2983
|
});
|
2962
2984
|
}
|
2963
2985
|
])
|
2964
|
-
.info({ angularVersion: '1.
|
2986
|
+
.info({ angularVersion: '1.8.2' });
|
2965
2987
|
}
|
2966
2988
|
|
2967
2989
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
@@ -3054,6 +3076,16 @@ function publishExternalAPI(angular) {
|
|
3054
3076
|
* - [`val()`](http://api.jquery.com/val/)
|
3055
3077
|
* - [`wrap()`](http://api.jquery.com/wrap/)
|
3056
3078
|
*
|
3079
|
+
* jqLite also provides a method restoring pre-1.8 insecure treatment of XHTML-like tags.
|
3080
|
+
* This legacy behavior turns input like `<div /><span />` to `<div></div><span></span>`
|
3081
|
+
* instead of `<div><span></span></div>` like version 1.8 & newer do. To restore it, invoke:
|
3082
|
+
* ```js
|
3083
|
+
* angular.UNSAFE_restoreLegacyJqLiteXHTMLReplacement();
|
3084
|
+
* ```
|
3085
|
+
* Note that this only patches jqLite. If you use jQuery 3.5.0 or newer, please read the
|
3086
|
+
* [jQuery 3.5 upgrade guide](https://jquery.com/upgrade-guide/3.5/) for more details
|
3087
|
+
* about the workarounds.
|
3088
|
+
*
|
3057
3089
|
* ## jQuery/jqLite Extras
|
3058
3090
|
* AngularJS also provides the following additional methods and events to both jQuery and jqLite:
|
3059
3091
|
*
|
@@ -3133,20 +3165,36 @@ var HTML_REGEXP = /<|&#?\w+;/;
|
|
3133
3165
|
var TAG_NAME_REGEXP = /<([\w:-]+)/;
|
3134
3166
|
var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi;
|
3135
3167
|
|
3168
|
+
// Table parts need to be wrapped with `<table>` or they're
|
3169
|
+
// stripped to their contents when put in a div.
|
3170
|
+
// XHTML parsers do not magically insert elements in the
|
3171
|
+
// same way that tag soup parsers do, so we cannot shorten
|
3172
|
+
// this by omitting <tbody> or other required elements.
|
3136
3173
|
var wrapMap = {
|
3137
|
-
|
3138
|
-
|
3139
|
-
|
3140
|
-
|
3141
|
-
'tr': [2, '<table><tbody>', '</tbody></table>'],
|
3142
|
-
'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],
|
3143
|
-
'_default': [0, '', '']
|
3174
|
+
thead: ['table'],
|
3175
|
+
col: ['colgroup', 'table'],
|
3176
|
+
tr: ['tbody', 'table'],
|
3177
|
+
td: ['tr', 'tbody', 'table']
|
3144
3178
|
};
|
3145
3179
|
|
3146
|
-
wrapMap.optgroup = wrapMap.option;
|
3147
3180
|
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
|
3148
3181
|
wrapMap.th = wrapMap.td;
|
3149
3182
|
|
3183
|
+
// Support: IE <10 only
|
3184
|
+
// IE 9 requires an option wrapper & it needs to have the whole table structure
|
3185
|
+
// set up in advance; assigning `"<td></td>"` to `tr.innerHTML` doesn't work, etc.
|
3186
|
+
var wrapMapIE9 = {
|
3187
|
+
option: [1, '<select multiple="multiple">', '</select>'],
|
3188
|
+
_default: [0, '', '']
|
3189
|
+
};
|
3190
|
+
|
3191
|
+
for (var key in wrapMap) {
|
3192
|
+
var wrapMapValueClosing = wrapMap[key];
|
3193
|
+
var wrapMapValue = wrapMapValueClosing.slice().reverse();
|
3194
|
+
wrapMapIE9[key] = [wrapMapValue.length, '<' + wrapMapValue.join('><') + '>', '</' + wrapMapValueClosing.join('></') + '>'];
|
3195
|
+
}
|
3196
|
+
|
3197
|
+
wrapMapIE9.optgroup = wrapMapIE9.option;
|
3150
3198
|
|
3151
3199
|
function jqLiteIsTextNode(html) {
|
3152
3200
|
return !HTML_REGEXP.test(html);
|
@@ -3167,7 +3215,7 @@ function jqLiteHasData(node) {
|
|
3167
3215
|
}
|
3168
3216
|
|
3169
3217
|
function jqLiteBuildFragment(html, context) {
|
3170
|
-
var tmp, tag, wrap,
|
3218
|
+
var tmp, tag, wrap, finalHtml,
|
3171
3219
|
fragment = context.createDocumentFragment(),
|
3172
3220
|
nodes = [], i;
|
3173
3221
|
|
@@ -3178,13 +3226,30 @@ function jqLiteBuildFragment(html, context) {
|
|
3178
3226
|
// Convert html into DOM nodes
|
3179
3227
|
tmp = fragment.appendChild(context.createElement('div'));
|
3180
3228
|
tag = (TAG_NAME_REGEXP.exec(html) || ['', ''])[1].toLowerCase();
|
3181
|
-
|
3182
|
-
|
3229
|
+
finalHtml = JQLite.legacyXHTMLReplacement ?
|
3230
|
+
html.replace(XHTML_TAG_REGEXP, '<$1></$2>') :
|
3231
|
+
html;
|
3183
3232
|
|
3184
|
-
|
3185
|
-
|
3186
|
-
|
3187
|
-
|
3233
|
+
if (msie < 10) {
|
3234
|
+
wrap = wrapMapIE9[tag] || wrapMapIE9._default;
|
3235
|
+
tmp.innerHTML = wrap[1] + finalHtml + wrap[2];
|
3236
|
+
|
3237
|
+
// Descend through wrappers to the right content
|
3238
|
+
i = wrap[0];
|
3239
|
+
while (i--) {
|
3240
|
+
tmp = tmp.firstChild;
|
3241
|
+
}
|
3242
|
+
} else {
|
3243
|
+
wrap = wrapMap[tag] || [];
|
3244
|
+
|
3245
|
+
// Create wrappers & descend into them
|
3246
|
+
i = wrap.length;
|
3247
|
+
while (--i > -1) {
|
3248
|
+
tmp.appendChild(window.document.createElement(wrap[i]));
|
3249
|
+
tmp = tmp.firstChild;
|
3250
|
+
}
|
3251
|
+
|
3252
|
+
tmp.innerHTML = finalHtml;
|
3188
3253
|
}
|
3189
3254
|
|
3190
3255
|
nodes = concat(nodes, tmp.childNodes);
|
@@ -8283,7 +8348,7 @@ function $TemplateCacheProvider() {
|
|
8283
8348
|
*
|
8284
8349
|
* When the original node and the replace template declare the same directive(s), they will be
|
8285
8350
|
* {@link guide/compiler#double-compilation-and-how-to-avoid-it compiled twice} because the compiler
|
8286
|
-
* does not deduplicate them. In many cases, this is not
|
8351
|
+
* does not deduplicate them. In many cases, this is not noticeable, but e.g. {@link ngModel} will
|
8287
8352
|
* attach `$formatters` and `$parsers` twice.
|
8288
8353
|
*
|
8289
8354
|
* See issue [#2573](https://github.com/angular/angular.js/issues/2573).
|
@@ -8363,8 +8428,8 @@ function $TemplateCacheProvider() {
|
|
8363
8428
|
*
|
8364
8429
|
* Based on the context, other options may exist to mark a value as trusted / configure the behavior
|
8365
8430
|
* of {@link ng.$sce}. For example, to restrict the `RESOURCE_URL` context to specific origins, use
|
8366
|
-
* the {@link $sceDelegateProvider#
|
8367
|
-
* and {@link $sceDelegateProvider#
|
8431
|
+
* the {@link $sceDelegateProvider#trustedResourceUrlList trustedResourceUrlList()}
|
8432
|
+
* and {@link $sceDelegateProvider#bannedResourceUrlList bannedResourceUrlList()}.
|
8368
8433
|
*
|
8369
8434
|
* {@link ng.$sce#what-trusted-context-types-are-supported- Find out more about the different context types}.
|
8370
8435
|
*
|
@@ -8373,7 +8438,7 @@ function $TemplateCacheProvider() {
|
|
8373
8438
|
* By default, `$sce` will throw an error if it detects untrusted HTML content, and will not bind the
|
8374
8439
|
* content.
|
8375
8440
|
* However, if you include the {@link ngSanitize ngSanitize module}, it will try to sanitize the
|
8376
|
-
* potentially dangerous HTML, e.g. strip non-
|
8441
|
+
* potentially dangerous HTML, e.g. strip non-trusted tags and attributes when binding to
|
8377
8442
|
* `innerHTML`.
|
8378
8443
|
*
|
8379
8444
|
* @example
|
@@ -8955,63 +9020,105 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
8955
9020
|
|
8956
9021
|
/**
|
8957
9022
|
* @ngdoc method
|
8958
|
-
* @name $compileProvider#
|
9023
|
+
* @name $compileProvider#aHrefSanitizationTrustedUrlList
|
8959
9024
|
* @kind function
|
8960
9025
|
*
|
8961
9026
|
* @description
|
8962
|
-
* Retrieves or overrides the default regular expression that is used for
|
9027
|
+
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
8963
9028
|
* urls during a[href] sanitization.
|
8964
9029
|
*
|
8965
9030
|
* The sanitization is a security measure aimed at preventing XSS attacks via html links.
|
8966
9031
|
*
|
8967
9032
|
* Any url about to be assigned to a[href] via data-binding is first normalized and turned into
|
8968
|
-
* an absolute url. Afterwards, the url is matched against the `
|
9033
|
+
* an absolute url. Afterwards, the url is matched against the `aHrefSanitizationTrustedUrlList`
|
8969
9034
|
* regular expression. If a match is found, the original url is written into the dom. Otherwise,
|
8970
9035
|
* the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
|
8971
9036
|
*
|
8972
|
-
* @param {RegExp=} regexp New regexp to
|
9037
|
+
* @param {RegExp=} regexp New regexp to trust urls with.
|
8973
9038
|
* @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
|
8974
9039
|
* chaining otherwise.
|
8975
9040
|
*/
|
8976
|
-
this.
|
9041
|
+
this.aHrefSanitizationTrustedUrlList = function(regexp) {
|
8977
9042
|
if (isDefined(regexp)) {
|
8978
|
-
$$sanitizeUriProvider.
|
9043
|
+
$$sanitizeUriProvider.aHrefSanitizationTrustedUrlList(regexp);
|
8979
9044
|
return this;
|
8980
9045
|
} else {
|
8981
|
-
return $$sanitizeUriProvider.
|
9046
|
+
return $$sanitizeUriProvider.aHrefSanitizationTrustedUrlList();
|
8982
9047
|
}
|
8983
9048
|
};
|
8984
9049
|
|
8985
9050
|
|
8986
9051
|
/**
|
8987
9052
|
* @ngdoc method
|
8988
|
-
* @name $compileProvider#
|
9053
|
+
* @name $compileProvider#aHrefSanitizationWhitelist
|
9054
|
+
* @kind function
|
9055
|
+
*
|
9056
|
+
* @deprecated
|
9057
|
+
* sinceVersion="1.8.1"
|
9058
|
+
*
|
9059
|
+
* This method is deprecated. Use {@link $compileProvider#aHrefSanitizationTrustedUrlList
|
9060
|
+
* aHrefSanitizationTrustedUrlList} instead.
|
9061
|
+
*/
|
9062
|
+
Object.defineProperty(this, 'aHrefSanitizationWhitelist', {
|
9063
|
+
get: function() {
|
9064
|
+
return this.aHrefSanitizationTrustedUrlList;
|
9065
|
+
},
|
9066
|
+
set: function(value) {
|
9067
|
+
this.aHrefSanitizationTrustedUrlList = value;
|
9068
|
+
}
|
9069
|
+
});
|
9070
|
+
|
9071
|
+
|
9072
|
+
/**
|
9073
|
+
* @ngdoc method
|
9074
|
+
* @name $compileProvider#imgSrcSanitizationTrustedUrlList
|
8989
9075
|
* @kind function
|
8990
9076
|
*
|
8991
9077
|
* @description
|
8992
|
-
* Retrieves or overrides the default regular expression that is used for
|
9078
|
+
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
8993
9079
|
* urls during img[src] sanitization.
|
8994
9080
|
*
|
8995
9081
|
* The sanitization is a security measure aimed at prevent XSS attacks via html links.
|
8996
9082
|
*
|
8997
9083
|
* Any url about to be assigned to img[src] via data-binding is first normalized and turned into
|
8998
|
-
* an absolute url. Afterwards, the url is matched against the `
|
9084
|
+
* an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationTrustedUrlList`
|
8999
9085
|
* regular expression. If a match is found, the original url is written into the dom. Otherwise,
|
9000
9086
|
* the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
|
9001
9087
|
*
|
9002
|
-
* @param {RegExp=} regexp New regexp to
|
9088
|
+
* @param {RegExp=} regexp New regexp to trust urls with.
|
9003
9089
|
* @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
|
9004
9090
|
* chaining otherwise.
|
9005
9091
|
*/
|
9006
|
-
this.
|
9092
|
+
this.imgSrcSanitizationTrustedUrlList = function(regexp) {
|
9007
9093
|
if (isDefined(regexp)) {
|
9008
|
-
$$sanitizeUriProvider.
|
9094
|
+
$$sanitizeUriProvider.imgSrcSanitizationTrustedUrlList(regexp);
|
9009
9095
|
return this;
|
9010
9096
|
} else {
|
9011
|
-
return $$sanitizeUriProvider.
|
9097
|
+
return $$sanitizeUriProvider.imgSrcSanitizationTrustedUrlList();
|
9012
9098
|
}
|
9013
9099
|
};
|
9014
9100
|
|
9101
|
+
|
9102
|
+
/**
|
9103
|
+
* @ngdoc method
|
9104
|
+
* @name $compileProvider#imgSrcSanitizationWhitelist
|
9105
|
+
* @kind function
|
9106
|
+
*
|
9107
|
+
* @deprecated
|
9108
|
+
* sinceVersion="1.8.1"
|
9109
|
+
*
|
9110
|
+
* This method is deprecated. Use {@link $compileProvider#imgSrcSanitizationTrustedUrlList
|
9111
|
+
* imgSrcSanitizationTrustedUrlList} instead.
|
9112
|
+
*/
|
9113
|
+
Object.defineProperty(this, 'imgSrcSanitizationWhitelist', {
|
9114
|
+
get: function() {
|
9115
|
+
return this.imgSrcSanitizationTrustedUrlList;
|
9116
|
+
},
|
9117
|
+
set: function(value) {
|
9118
|
+
this.imgSrcSanitizationTrustedUrlList = value;
|
9119
|
+
}
|
9120
|
+
});
|
9121
|
+
|
9015
9122
|
/**
|
9016
9123
|
* @ngdoc method
|
9017
9124
|
* @name $compileProvider#debugInfoEnabled
|
@@ -12262,7 +12369,7 @@ function $HttpProvider() {
|
|
12262
12369
|
|
12263
12370
|
/**
|
12264
12371
|
* @ngdoc property
|
12265
|
-
* @name $httpProvider#
|
12372
|
+
* @name $httpProvider#xsrfTrustedOrigins
|
12266
12373
|
* @description
|
12267
12374
|
*
|
12268
12375
|
* Array containing URLs whose origins are trusted to receive the XSRF token. See the
|
@@ -12276,7 +12383,7 @@ function $HttpProvider() {
|
|
12276
12383
|
* Examples: `http://example.com`, `https://api.example.com:9876`
|
12277
12384
|
*
|
12278
12385
|
* <div class="alert alert-warning">
|
12279
|
-
* It is not possible to
|
12386
|
+
* It is not possible to trust specific URLs/paths. The `path`, `query` and `fragment` parts
|
12280
12387
|
* of a URL will be ignored. For example, `https://foo.com/path/bar?query=baz#fragment` will be
|
12281
12388
|
* treated as `https://foo.com`, meaning that **all** requests to URLs starting with
|
12282
12389
|
* `https://foo.com/` will include the XSRF token.
|
@@ -12287,9 +12394,9 @@ function $HttpProvider() {
|
|
12287
12394
|
* ```js
|
12288
12395
|
* // App served from `https://example.com/`.
|
12289
12396
|
* angular.
|
12290
|
-
* module('
|
12397
|
+
* module('xsrfTrustedOriginsExample', []).
|
12291
12398
|
* config(['$httpProvider', function($httpProvider) {
|
12292
|
-
* $httpProvider.
|
12399
|
+
* $httpProvider.xsrfTrustedOrigins.push('https://api.example.com');
|
12293
12400
|
* }]).
|
12294
12401
|
* run(['$http', function($http) {
|
12295
12402
|
* // The XSRF token will be sent.
|
@@ -12300,7 +12407,27 @@ function $HttpProvider() {
|
|
12300
12407
|
* }]);
|
12301
12408
|
* ```
|
12302
12409
|
*/
|
12303
|
-
var
|
12410
|
+
var xsrfTrustedOrigins = this.xsrfTrustedOrigins = [];
|
12411
|
+
|
12412
|
+
/**
|
12413
|
+
* @ngdoc property
|
12414
|
+
* @name $httpProvider#xsrfWhitelistedOrigins
|
12415
|
+
* @description
|
12416
|
+
*
|
12417
|
+
* @deprecated
|
12418
|
+
* sinceVersion="1.8.1"
|
12419
|
+
*
|
12420
|
+
* This property is deprecated. Use {@link $httpProvider#xsrfTrustedOrigins xsrfTrustedOrigins}
|
12421
|
+
* instead.
|
12422
|
+
*/
|
12423
|
+
Object.defineProperty(this, 'xsrfWhitelistedOrigins', {
|
12424
|
+
get: function() {
|
12425
|
+
return this.xsrfTrustedOrigins;
|
12426
|
+
},
|
12427
|
+
set: function(origins) {
|
12428
|
+
this.xsrfTrustedOrigins = origins;
|
12429
|
+
}
|
12430
|
+
});
|
12304
12431
|
|
12305
12432
|
this.$get = ['$browser', '$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector', '$sce',
|
12306
12433
|
function($browser, $httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector, $sce) {
|
@@ -12328,7 +12455,7 @@ function $HttpProvider() {
|
|
12328
12455
|
/**
|
12329
12456
|
* A function to check request URLs against a list of allowed origins.
|
12330
12457
|
*/
|
12331
|
-
var urlIsAllowedOrigin = urlIsAllowedOriginFactory(
|
12458
|
+
var urlIsAllowedOrigin = urlIsAllowedOriginFactory(xsrfTrustedOrigins);
|
12332
12459
|
|
12333
12460
|
/**
|
12334
12461
|
* @ngdoc service
|
@@ -12702,16 +12829,16 @@ function $HttpProvider() {
|
|
12702
12829
|
* The header will — by default — **not** be set for cross-domain requests. This
|
12703
12830
|
* prevents unauthorized servers (e.g. malicious or compromised 3rd-party APIs) from gaining
|
12704
12831
|
* access to your users' XSRF tokens and exposing them to Cross Site Request Forgery. If you
|
12705
|
-
* want to, you can
|
12706
|
-
* to {@link ng.$httpProvider#
|
12832
|
+
* want to, you can trust additional origins to also receive the XSRF token, by adding them
|
12833
|
+
* to {@link ng.$httpProvider#xsrfTrustedOrigins xsrfTrustedOrigins}. This might be
|
12707
12834
|
* useful, for example, if your application, served from `example.com`, needs to access your API
|
12708
12835
|
* at `api.example.com`.
|
12709
|
-
* See {@link ng.$httpProvider#
|
12836
|
+
* See {@link ng.$httpProvider#xsrfTrustedOrigins $httpProvider.xsrfTrustedOrigins} for
|
12710
12837
|
* more details.
|
12711
12838
|
*
|
12712
12839
|
* <div class="alert alert-danger">
|
12713
12840
|
* **Warning**<br />
|
12714
|
-
* Only
|
12841
|
+
* Only trusted origins that you have control over and make sure you understand the
|
12715
12842
|
* implications of doing so.
|
12716
12843
|
* </div>
|
12717
12844
|
*
|
@@ -12838,8 +12965,8 @@ function $HttpProvider() {
|
|
12838
12965
|
<file name="script.js">
|
12839
12966
|
angular.module('httpExample', [])
|
12840
12967
|
.config(['$sceDelegateProvider', function($sceDelegateProvider) {
|
12841
|
-
// We must
|
12842
|
-
$sceDelegateProvider.
|
12968
|
+
// We must add the JSONP endpoint that we are using to the trusted list to show that we trust it
|
12969
|
+
$sceDelegateProvider.trustedResourceUrlList([
|
12843
12970
|
'self',
|
12844
12971
|
'https://angularjs.org/**'
|
12845
12972
|
]);
|
@@ -13096,8 +13223,8 @@ function $HttpProvider() {
|
|
13096
13223
|
*
|
13097
13224
|
* Note that, since JSONP requests are sensitive because the response is given full access to the browser,
|
13098
13225
|
* the url must be declared, via {@link $sce} as a trusted resource URL.
|
13099
|
-
* You can trust a URL by adding it to the
|
13100
|
-
* {@link $sceDelegateProvider#
|
13226
|
+
* You can trust a URL by adding it to the trusted resource URL list via
|
13227
|
+
* {@link $sceDelegateProvider#trustedResourceUrlList `$sceDelegateProvider.trustedResourceUrlList`} or
|
13101
13228
|
* by explicitly trusting the URL via {@link $sce#trustAsResourceUrl `$sce.trustAsResourceUrl(url)`}.
|
13102
13229
|
*
|
13103
13230
|
* You should avoid generating the URL for the JSONP request from user provided data.
|
@@ -19833,12 +19960,12 @@ function $RootScopeProvider() {
|
|
19833
19960
|
*/
|
19834
19961
|
function $$SanitizeUriProvider() {
|
19835
19962
|
|
19836
|
-
var
|
19837
|
-
|
19963
|
+
var aHrefSanitizationTrustedUrlList = /^\s*(https?|s?ftp|mailto|tel|file):/,
|
19964
|
+
imgSrcSanitizationTrustedUrlList = /^\s*((https?|ftp|file|blob):|data:image\/)/;
|
19838
19965
|
|
19839
19966
|
/**
|
19840
19967
|
* @description
|
19841
|
-
* Retrieves or overrides the default regular expression that is used for
|
19968
|
+
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
19842
19969
|
* urls during a[href] sanitization.
|
19843
19970
|
*
|
19844
19971
|
* The sanitization is a security measure aimed at prevent XSS attacks via HTML anchor links.
|
@@ -19847,27 +19974,27 @@ function $$SanitizeUriProvider() {
|
|
19847
19974
|
* the $sce.URL security context. When interpolation occurs a call is made to `$sce.trustAsUrl(url)`
|
19848
19975
|
* which in turn may call `$$sanitizeUri(url, isMedia)` to sanitize the potentially malicious URL.
|
19849
19976
|
*
|
19850
|
-
* If the URL matches the `
|
19977
|
+
* If the URL matches the `aHrefSanitizationTrustedUrlList` regular expression, it is returned unchanged.
|
19851
19978
|
*
|
19852
19979
|
* If there is no match the URL is returned prefixed with `'unsafe:'` to ensure that when it is written
|
19853
19980
|
* to the DOM it is inactive and potentially malicious code will not be executed.
|
19854
19981
|
*
|
19855
|
-
* @param {RegExp=} regexp New regexp to
|
19982
|
+
* @param {RegExp=} regexp New regexp to trust urls with.
|
19856
19983
|
* @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
|
19857
19984
|
* chaining otherwise.
|
19858
19985
|
*/
|
19859
|
-
this.
|
19986
|
+
this.aHrefSanitizationTrustedUrlList = function(regexp) {
|
19860
19987
|
if (isDefined(regexp)) {
|
19861
|
-
|
19988
|
+
aHrefSanitizationTrustedUrlList = regexp;
|
19862
19989
|
return this;
|
19863
19990
|
}
|
19864
|
-
return
|
19991
|
+
return aHrefSanitizationTrustedUrlList;
|
19865
19992
|
};
|
19866
19993
|
|
19867
19994
|
|
19868
19995
|
/**
|
19869
19996
|
* @description
|
19870
|
-
* Retrieves or overrides the default regular expression that is used for
|
19997
|
+
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
19871
19998
|
* urls during img[src] sanitization.
|
19872
19999
|
*
|
19873
20000
|
* The sanitization is a security measure aimed at prevent XSS attacks via HTML image src links.
|
@@ -19877,27 +20004,28 @@ function $$SanitizeUriProvider() {
|
|
19877
20004
|
* `$sce.trustAsMediaUrl(url)` which in turn may call `$$sanitizeUri(url, isMedia)` to sanitize
|
19878
20005
|
* the potentially malicious URL.
|
19879
20006
|
*
|
19880
|
-
* If the URL matches the `
|
20007
|
+
* If the URL matches the `imgSrcSanitizationTrustedUrlList` regular expression, it is returned
|
20008
|
+
* unchanged.
|
19881
20009
|
*
|
19882
20010
|
* If there is no match the URL is returned prefixed with `'unsafe:'` to ensure that when it is written
|
19883
20011
|
* to the DOM it is inactive and potentially malicious code will not be executed.
|
19884
20012
|
*
|
19885
|
-
* @param {RegExp=} regexp New regexp to
|
20013
|
+
* @param {RegExp=} regexp New regexp to trust urls with.
|
19886
20014
|
* @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
|
19887
20015
|
* chaining otherwise.
|
19888
20016
|
*/
|
19889
|
-
this.
|
20017
|
+
this.imgSrcSanitizationTrustedUrlList = function(regexp) {
|
19890
20018
|
if (isDefined(regexp)) {
|
19891
|
-
|
20019
|
+
imgSrcSanitizationTrustedUrlList = regexp;
|
19892
20020
|
return this;
|
19893
20021
|
}
|
19894
|
-
return
|
20022
|
+
return imgSrcSanitizationTrustedUrlList;
|
19895
20023
|
};
|
19896
20024
|
|
19897
20025
|
this.$get = function() {
|
19898
20026
|
return function sanitizeUri(uri, isMediaUrl) {
|
19899
20027
|
// if (!uri) return uri;
|
19900
|
-
var regex = isMediaUrl ?
|
20028
|
+
var regex = isMediaUrl ? imgSrcSanitizationTrustedUrlList : aHrefSanitizationTrustedUrlList;
|
19901
20029
|
var normalizedVal = urlResolve(uri && uri.trim()).href;
|
19902
20030
|
if (normalizedVal !== '' && !normalizedVal.match(regex)) {
|
19903
20031
|
return 'unsafe:' + normalizedVal;
|
@@ -20025,10 +20153,10 @@ function adjustMatchers(matchers) {
|
|
20025
20153
|
* The default instance of `$sceDelegate` should work out of the box with little pain. While you
|
20026
20154
|
* can override it completely to change the behavior of `$sce`, the common case would
|
20027
20155
|
* involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting
|
20028
|
-
* your own
|
20029
|
-
* templates. Refer {@link ng.$sceDelegateProvider#
|
20030
|
-
* $sceDelegateProvider.
|
20031
|
-
* ng.$sceDelegateProvider#
|
20156
|
+
* your own trusted and banned resource lists for trusting URLs used for loading AngularJS resources
|
20157
|
+
* such as templates. Refer {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
20158
|
+
* $sceDelegateProvider.trustedResourceUrlList} and {@link
|
20159
|
+
* ng.$sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider.bannedResourceUrlList}
|
20032
20160
|
*/
|
20033
20161
|
|
20034
20162
|
/**
|
@@ -20041,12 +20169,12 @@ function adjustMatchers(matchers) {
|
|
20041
20169
|
* The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate
|
20042
20170
|
* $sceDelegate service}, used as a delegate for {@link ng.$sce Strict Contextual Escaping (SCE)}.
|
20043
20171
|
*
|
20044
|
-
* The `$sceDelegateProvider` allows one to get/set the
|
20045
|
-
* that the URLs used for sourcing AngularJS templates and
|
20046
|
-
* places that use the `$sce.RESOURCE_URL` context). See
|
20047
|
-
* {@link ng.$sceDelegateProvider#
|
20048
|
-
* and
|
20049
|
-
* {@link ng.$sceDelegateProvider#
|
20172
|
+
* The `$sceDelegateProvider` allows one to get/set the `trustedResourceUrlList` and
|
20173
|
+
* `bannedResourceUrlList` used to ensure that the URLs used for sourcing AngularJS templates and
|
20174
|
+
* other script-running URLs are safe (all places that use the `$sce.RESOURCE_URL` context). See
|
20175
|
+
* {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
20176
|
+
* $sceDelegateProvider.trustedResourceUrlList} and
|
20177
|
+
* {@link ng.$sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider.bannedResourceUrlList},
|
20050
20178
|
*
|
20051
20179
|
* For the general details about this service in AngularJS, read the main page for {@link ng.$sce
|
20052
20180
|
* Strict Contextual Escaping (SCE)}.
|
@@ -20062,98 +20190,139 @@ function adjustMatchers(matchers) {
|
|
20062
20190
|
*
|
20063
20191
|
* ```
|
20064
20192
|
* angular.module('myApp', []).config(function($sceDelegateProvider) {
|
20065
|
-
* $sceDelegateProvider.
|
20193
|
+
* $sceDelegateProvider.trustedResourceUrlList([
|
20066
20194
|
* // Allow same origin resource loads.
|
20067
20195
|
* 'self',
|
20068
20196
|
* // Allow loading from our assets domain. Notice the difference between * and **.
|
20069
20197
|
* 'http://srv*.assets.example.com/**'
|
20070
20198
|
* ]);
|
20071
20199
|
*
|
20072
|
-
* // The
|
20073
|
-
*
|
20200
|
+
* // The banned resource URL list overrides the trusted resource URL list so the open redirect
|
20201
|
+
* // here is blocked.
|
20202
|
+
* $sceDelegateProvider.bannedResourceUrlList([
|
20074
20203
|
* 'http://myapp.example.com/clickThru**'
|
20075
20204
|
* ]);
|
20076
20205
|
* });
|
20077
20206
|
* ```
|
20078
|
-
* Note that an empty
|
20207
|
+
* Note that an empty trusted resource URL list will block every resource URL from being loaded, and will require
|
20079
20208
|
* you to manually mark each one as trusted with `$sce.trustAsResourceUrl`. However, templates
|
20080
20209
|
* requested by {@link ng.$templateRequest $templateRequest} that are present in
|
20081
20210
|
* {@link ng.$templateCache $templateCache} will not go through this check. If you have a mechanism
|
20082
20211
|
* to populate your templates in that cache at config time, then it is a good idea to remove 'self'
|
20083
|
-
* from
|
20084
|
-
* for instance attacker-controlled `ng-includes`.
|
20212
|
+
* from the trusted resource URL lsit. This helps to mitigate the security impact of certain types
|
20213
|
+
* of issues, like for instance attacker-controlled `ng-includes`.
|
20085
20214
|
*/
|
20086
20215
|
|
20087
20216
|
function $SceDelegateProvider() {
|
20088
20217
|
this.SCE_CONTEXTS = SCE_CONTEXTS;
|
20089
20218
|
|
20090
20219
|
// Resource URLs can also be trusted by policy.
|
20091
|
-
var
|
20092
|
-
|
20220
|
+
var trustedResourceUrlList = ['self'],
|
20221
|
+
bannedResourceUrlList = [];
|
20093
20222
|
|
20094
20223
|
/**
|
20095
20224
|
* @ngdoc method
|
20096
|
-
* @name $sceDelegateProvider#
|
20225
|
+
* @name $sceDelegateProvider#trustedResourceUrlList
|
20097
20226
|
* @kind function
|
20098
20227
|
*
|
20099
|
-
* @param {Array=}
|
20100
|
-
* provided. This must be an array or null. A snapshot of this array is used so
|
20101
|
-
* changes to the array are ignored.
|
20228
|
+
* @param {Array=} trustedResourceUrlList When provided, replaces the trustedResourceUrlList with
|
20229
|
+
* the value provided. This must be an array or null. A snapshot of this array is used so
|
20230
|
+
* further changes to the array are ignored.
|
20102
20231
|
* Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
|
20103
20232
|
* allowed in this array.
|
20104
20233
|
*
|
20105
|
-
* @return {Array} The currently set
|
20234
|
+
* @return {Array} The currently set trusted resource URL array.
|
20106
20235
|
*
|
20107
20236
|
* @description
|
20108
|
-
* Sets/Gets the
|
20237
|
+
* Sets/Gets the list trusted of resource URLs.
|
20109
20238
|
*
|
20110
|
-
* The **default value** when no
|
20111
|
-
* same origin resource requests.
|
20239
|
+
* The **default value** when no `trustedResourceUrlList` has been explicitly set is `['self']`
|
20240
|
+
* allowing only same origin resource requests.
|
20112
20241
|
*
|
20113
20242
|
* <div class="alert alert-warning">
|
20114
|
-
* **Note:** the default
|
20115
|
-
* with other apps! It is a good idea to limit it to only your application's directory.
|
20243
|
+
* **Note:** the default `trustedResourceUrlList` of 'self' is not recommended if your app shares
|
20244
|
+
* its origin with other apps! It is a good idea to limit it to only your application's directory.
|
20116
20245
|
* </div>
|
20117
20246
|
*/
|
20118
|
-
this.
|
20247
|
+
this.trustedResourceUrlList = function(value) {
|
20119
20248
|
if (arguments.length) {
|
20120
|
-
|
20249
|
+
trustedResourceUrlList = adjustMatchers(value);
|
20121
20250
|
}
|
20122
|
-
return
|
20251
|
+
return trustedResourceUrlList;
|
20123
20252
|
};
|
20124
20253
|
|
20125
20254
|
/**
|
20126
20255
|
* @ngdoc method
|
20127
|
-
* @name $sceDelegateProvider#
|
20256
|
+
* @name $sceDelegateProvider#resourceUrlWhitelist
|
20257
|
+
* @kind function
|
20258
|
+
*
|
20259
|
+
* @deprecated
|
20260
|
+
* sinceVersion="1.8.1"
|
20261
|
+
*
|
20262
|
+
* This method is deprecated. Use {@link $sceDelegateProvider#trustedResourceUrlList
|
20263
|
+
* trustedResourceUrlList} instead.
|
20264
|
+
*/
|
20265
|
+
Object.defineProperty(this, 'resourceUrlWhitelist', {
|
20266
|
+
get: function() {
|
20267
|
+
return this.trustedResourceUrlList;
|
20268
|
+
},
|
20269
|
+
set: function(value) {
|
20270
|
+
this.trustedResourceUrlList = value;
|
20271
|
+
}
|
20272
|
+
});
|
20273
|
+
|
20274
|
+
/**
|
20275
|
+
* @ngdoc method
|
20276
|
+
* @name $sceDelegateProvider#bannedResourceUrlList
|
20128
20277
|
* @kind function
|
20129
20278
|
*
|
20130
|
-
* @param {Array=}
|
20131
|
-
* provided.
|
20132
|
-
* changes to the array are ignored.</p><p>
|
20279
|
+
* @param {Array=} bannedResourceUrlList When provided, replaces the `bannedResourceUrlList` with
|
20280
|
+
* the value provided. This must be an array or null. A snapshot of this array is used so
|
20281
|
+
* further changes to the array are ignored.</p><p>
|
20133
20282
|
* Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
|
20134
20283
|
* allowed in this array.</p><p>
|
20135
|
-
* The typical usage for the
|
20284
|
+
* The typical usage for the `bannedResourceUrlList` is to **block
|
20136
20285
|
* [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as
|
20137
20286
|
* these would otherwise be trusted but actually return content from the redirected domain.
|
20138
20287
|
* </p><p>
|
20139
|
-
* Finally, **the
|
20288
|
+
* Finally, **the banned resource URL list overrides the trusted resource URL list** and has
|
20289
|
+
* the final say.
|
20140
20290
|
*
|
20141
|
-
* @return {Array} The currently set
|
20291
|
+
* @return {Array} The currently set `bannedResourceUrlList` array.
|
20142
20292
|
*
|
20143
20293
|
* @description
|
20144
|
-
* Sets/Gets the
|
20294
|
+
* Sets/Gets the `bannedResourceUrlList` of trusted resource URLs.
|
20145
20295
|
*
|
20146
|
-
* The **default value** when no
|
20147
|
-
* is no
|
20296
|
+
* The **default value** when no trusted resource URL list has been explicitly set is the empty
|
20297
|
+
* array (i.e. there is no `bannedResourceUrlList`.)
|
20148
20298
|
*/
|
20149
|
-
|
20150
|
-
this.resourceUrlBlacklist = function(value) {
|
20299
|
+
this.bannedResourceUrlList = function(value) {
|
20151
20300
|
if (arguments.length) {
|
20152
|
-
|
20301
|
+
bannedResourceUrlList = adjustMatchers(value);
|
20153
20302
|
}
|
20154
|
-
return
|
20303
|
+
return bannedResourceUrlList;
|
20155
20304
|
};
|
20156
20305
|
|
20306
|
+
/**
|
20307
|
+
* @ngdoc method
|
20308
|
+
* @name $sceDelegateProvider#resourceUrlBlacklist
|
20309
|
+
* @kind function
|
20310
|
+
*
|
20311
|
+
* @deprecated
|
20312
|
+
* sinceVersion="1.8.1"
|
20313
|
+
*
|
20314
|
+
* This method is deprecated. Use {@link $sceDelegateProvider#bannedResourceUrlList
|
20315
|
+
* bannedResourceUrlList} instead.
|
20316
|
+
*/
|
20317
|
+
Object.defineProperty(this, 'resourceUrlBlacklist', {
|
20318
|
+
get: function() {
|
20319
|
+
return this.bannedResourceUrlList;
|
20320
|
+
},
|
20321
|
+
set: function(value) {
|
20322
|
+
this.bannedResourceUrlList = value;
|
20323
|
+
}
|
20324
|
+
});
|
20325
|
+
|
20157
20326
|
this.$get = ['$injector', '$$sanitizeUri', function($injector, $$sanitizeUri) {
|
20158
20327
|
|
20159
20328
|
var htmlSanitizer = function htmlSanitizer(html) {
|
@@ -20177,17 +20346,17 @@ function $SceDelegateProvider() {
|
|
20177
20346
|
function isResourceUrlAllowedByPolicy(url) {
|
20178
20347
|
var parsedUrl = urlResolve(url.toString());
|
20179
20348
|
var i, n, allowed = false;
|
20180
|
-
// Ensure that at least one item from the
|
20181
|
-
for (i = 0, n =
|
20182
|
-
if (matchUrl(
|
20349
|
+
// Ensure that at least one item from the trusted resource URL list allows this url.
|
20350
|
+
for (i = 0, n = trustedResourceUrlList.length; i < n; i++) {
|
20351
|
+
if (matchUrl(trustedResourceUrlList[i], parsedUrl)) {
|
20183
20352
|
allowed = true;
|
20184
20353
|
break;
|
20185
20354
|
}
|
20186
20355
|
}
|
20187
20356
|
if (allowed) {
|
20188
|
-
// Ensure that no item from the
|
20189
|
-
for (i = 0, n =
|
20190
|
-
if (matchUrl(
|
20357
|
+
// Ensure that no item from the banned resource URL list has blocked this url.
|
20358
|
+
for (i = 0, n = bannedResourceUrlList.length; i < n; i++) {
|
20359
|
+
if (matchUrl(bannedResourceUrlList[i], parsedUrl)) {
|
20191
20360
|
allowed = false;
|
20192
20361
|
break;
|
20193
20362
|
}
|
@@ -20308,9 +20477,9 @@ function $SceDelegateProvider() {
|
|
20308
20477
|
* The contexts that can be sanitized are $sce.MEDIA_URL, $sce.URL and $sce.HTML. The first two are available
|
20309
20478
|
* by default, and the third one relies on the `$sanitize` service (which may be loaded through
|
20310
20479
|
* the `ngSanitize` module). Furthermore, for $sce.RESOURCE_URL context, a plain string may be
|
20311
|
-
* accepted if the resource url policy defined by {@link ng.$sceDelegateProvider#
|
20312
|
-
* `$sceDelegateProvider.
|
20313
|
-
* `$sceDelegateProvider.
|
20480
|
+
* accepted if the resource url policy defined by {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
20481
|
+
* `$sceDelegateProvider.trustedResourceUrlList`} and {@link ng.$sceDelegateProvider#bannedResourceUrlList
|
20482
|
+
* `$sceDelegateProvider.bannedResourceUrlList`} accepts that resource.
|
20314
20483
|
*
|
20315
20484
|
* This function will throw if the safe type isn't appropriate for this context, or if the
|
20316
20485
|
* value given cannot be accepted in the context (which might be caused by sanitization not
|
@@ -20404,9 +20573,9 @@ function $SceDelegateProvider() {
|
|
20404
20573
|
*
|
20405
20574
|
* To systematically block XSS security bugs, AngularJS treats all values as untrusted by default in
|
20406
20575
|
* HTML or sensitive URL bindings. When binding untrusted values, AngularJS will automatically
|
20407
|
-
* run security checks on them (sanitizations,
|
20408
|
-
* cannot guarantee the security of the result. That behavior depends strongly on contexts:
|
20409
|
-
* can be sanitized, but template URLs cannot, for instance.
|
20576
|
+
* run security checks on them (sanitizations, trusted URL resource, depending on context), or throw
|
20577
|
+
* when it cannot guarantee the security of the result. That behavior depends strongly on contexts:
|
20578
|
+
* HTML can be sanitized, but template URLs cannot, for instance.
|
20410
20579
|
*
|
20411
20580
|
* To illustrate this, consider the `ng-bind-html` directive. It renders its value directly as HTML:
|
20412
20581
|
* we call that the *context*. When given an untrusted input, AngularJS will attempt to sanitize it
|
@@ -20485,8 +20654,8 @@ function $SceDelegateProvider() {
|
|
20485
20654
|
* By default, AngularJS only loads templates from the same domain and protocol as the application
|
20486
20655
|
* document. This is done by calling {@link ng.$sce#getTrustedResourceUrl
|
20487
20656
|
* $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or
|
20488
|
-
* protocols, you may either {@link ng.$sceDelegateProvider#
|
20489
|
-
*
|
20657
|
+
* protocols, you may either add them to the {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
20658
|
+
* trustedResourceUrlList} or {@link ng.$sce#trustAsResourceUrl wrap them} into trusted values.
|
20490
20659
|
*
|
20491
20660
|
* *Please note*:
|
20492
20661
|
* The browser's
|
@@ -20514,8 +20683,8 @@ function $SceDelegateProvider() {
|
|
20514
20683
|
* templates in `ng-include` from your application's domain without having to even know about SCE.
|
20515
20684
|
* It blocks loading templates from other domains or loading templates over http from an https
|
20516
20685
|
* served document. You can change these by setting your own custom {@link
|
20517
|
-
* ng.$sceDelegateProvider#
|
20518
|
-
* ng.$sceDelegateProvider#
|
20686
|
+
* ng.$sceDelegateProvider#trustedResourceUrlList trusted resource URL list} and {@link
|
20687
|
+
* ng.$sceDelegateProvider#bannedResourceUrlList banned resource URL list} for matching such URLs.
|
20519
20688
|
*
|
20520
20689
|
* This significantly reduces the overhead. It is far easier to pay the small overhead and have an
|
20521
20690
|
* application that's secure and can be audited to verify that with much more ease than bolting
|
@@ -20530,7 +20699,7 @@ function $SceDelegateProvider() {
|
|
20530
20699
|
* | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |
|
20531
20700
|
* | `$sce.MEDIA_URL` | For URLs that are safe to render as media. Is automatically converted from string by sanitizing when needed. |
|
20532
20701
|
* | `$sce.URL` | For URLs that are safe to follow as links. Is automatically converted from string by sanitizing when needed. Note that `$sce.URL` makes a stronger statement about the URL than `$sce.MEDIA_URL` does and therefore contexts requiring values trusted for `$sce.URL` can be used anywhere that values trusted for `$sce.MEDIA_URL` are required.|
|
20533
|
-
* | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` or `$sce.MEDIA_URL` do and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` or `$sce.MEDIA_URL` are required. <br><br> The {@link $sceDelegateProvider#
|
20702
|
+
* | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` or `$sce.MEDIA_URL` do and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` or `$sce.MEDIA_URL` are required. <br><br> The {@link $sceDelegateProvider#trustedResourceUrlList $sceDelegateProvider#trustedResourceUrlList()} and {@link $sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider#bannedResourceUrlList()} can be used to restrict trusted origins for `RESOURCE_URL` |
|
20534
20703
|
* | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |
|
20535
20704
|
*
|
20536
20705
|
*
|
@@ -20548,7 +20717,7 @@ function $SceDelegateProvider() {
|
|
20548
20717
|
* There are no CSS or JS context bindings in AngularJS currently, so their corresponding `$sce.trustAs`
|
20549
20718
|
* functions aren't useful yet. This might evolve.
|
20550
20719
|
*
|
20551
|
-
* ### Format of items in {@link ng.$sceDelegateProvider#
|
20720
|
+
* ### Format of items in {@link ng.$sceDelegateProvider#trustedResourceUrlList trustedResourceUrlList}/{@link ng.$sceDelegateProvider#bannedResourceUrlList bannedResourceUrlList} <a name="resourceUrlPatternItem"></a>
|
20552
20721
|
*
|
20553
20722
|
* Each element in these arrays must be one of the following:
|
20554
20723
|
*
|
@@ -20562,7 +20731,7 @@ function $SceDelegateProvider() {
|
|
20562
20731
|
* match themselves.
|
20563
20732
|
* - `*`: matches zero or more occurrences of any character other than one of the following 6
|
20564
20733
|
* characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use
|
20565
|
-
*
|
20734
|
+
* for matching resource URL lists.
|
20566
20735
|
* - `**`: matches zero or more occurrences of *any* character. As such, it's not
|
20567
20736
|
* appropriate for use in a scheme, domain, etc. as it would match too much. (e.g.
|
20568
20737
|
* http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might
|
@@ -21366,10 +21535,10 @@ function $TemplateRequestProvider() {
|
|
21366
21535
|
handleRequestFn.totalPendingRequests++;
|
21367
21536
|
|
21368
21537
|
// We consider the template cache holds only trusted templates, so
|
21369
|
-
// there's no need to go through
|
21370
|
-
// are included in there. This also makes
|
21371
|
-
// directive, no matter its name. However, we
|
21372
|
-
// types.
|
21538
|
+
// there's no need to go through adding the template again to the trusted
|
21539
|
+
// resources for keys that already are included in there. This also makes
|
21540
|
+
// AngularJS accept any script directive, no matter its name. However, we
|
21541
|
+
// still need to unwrap trusted types.
|
21373
21542
|
if (!isString(tpl) || isUndefined($templateCache.get(tpl))) {
|
21374
21543
|
tpl = $sce.getTrustedResourceUrl(tpl);
|
21375
21544
|
}
|
@@ -21774,20 +21943,20 @@ function urlIsSameOriginAsBaseUrl(requestUrl) {
|
|
21774
21943
|
}
|
21775
21944
|
|
21776
21945
|
/**
|
21777
|
-
* Create a function that can check a URL's origin against a list of allowed/
|
21946
|
+
* Create a function that can check a URL's origin against a list of allowed/trusted origins.
|
21778
21947
|
* The current location's origin is implicitly trusted.
|
21779
21948
|
*
|
21780
|
-
* @param {string[]}
|
21949
|
+
* @param {string[]} trustedOriginUrls - A list of URLs (strings), whose origins are trusted.
|
21781
21950
|
*
|
21782
21951
|
* @returns {Function} - A function that receives a URL (string or parsed URL object) and returns
|
21783
21952
|
* whether it is of an allowed origin.
|
21784
21953
|
*/
|
21785
|
-
function urlIsAllowedOriginFactory(
|
21786
|
-
var parsedAllowedOriginUrls = [originUrl].concat(
|
21954
|
+
function urlIsAllowedOriginFactory(trustedOriginUrls) {
|
21955
|
+
var parsedAllowedOriginUrls = [originUrl].concat(trustedOriginUrls.map(urlResolve));
|
21787
21956
|
|
21788
21957
|
/**
|
21789
21958
|
* Check whether the specified URL (string or parsed URL object) has an origin that is allowed
|
21790
|
-
* based on a list of
|
21959
|
+
* based on a list of trusted-origin URLs. The current location's origin is implicitly
|
21791
21960
|
* trusted.
|
21792
21961
|
*
|
21793
21962
|
* @param {string|Object} requestUrl - The URL to be checked (provided as a string that will be
|
@@ -29534,9 +29703,9 @@ var ngIfDirective = ['$animate', '$compile', function($animate, $compile) {
|
|
29534
29703
|
* By default, the template URL is restricted to the same domain and protocol as the
|
29535
29704
|
* application document. This is done by calling {@link $sce#getTrustedResourceUrl
|
29536
29705
|
* $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols
|
29537
|
-
* you may either {@link ng.$sceDelegateProvider#
|
29538
|
-
* {@link $sce#trustAsResourceUrl wrap them} as trusted values. Refer to
|
29539
|
-
* ng.$sce Strict Contextual Escaping}.
|
29706
|
+
* you may either add them to your {@link ng.$sceDelegateProvider#trustedResourceUrlList trusted
|
29707
|
+
* resource URL list} or {@link $sce#trustAsResourceUrl wrap them} as trusted values. Refer to
|
29708
|
+
* AngularJS's {@link ng.$sce Strict Contextual Escaping}.
|
29540
29709
|
*
|
29541
29710
|
* In addition, the browser's
|
29542
29711
|
* [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)
|
@@ -33606,7 +33775,7 @@ var ngRefDirective = ['$parse', function($parse) {
|
|
33606
33775
|
* For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after
|
33607
33776
|
* the items have been processed through the filter.
|
33608
33777
|
*
|
33609
|
-
* Please note that `as [variable name] is not an operator but rather a part of ngRepeat
|
33778
|
+
* Please note that `as [variable name]` is not an operator but rather a part of ngRepeat
|
33610
33779
|
* micro-syntax so it can be used only after all filters (and not as operator, inside an expression).
|
33611
33780
|
*
|
33612
33781
|
* For example: `item in items | filter : x | orderBy : order | limitTo : limit as results track by item.id` .
|
@@ -34415,11 +34584,11 @@ var ngHideDirective = ['$animate', function($animate) {
|
|
34415
34584
|
var colorSpan = element(by.css('span'));
|
34416
34585
|
|
34417
34586
|
it('should check ng-style', function() {
|
34418
|
-
expect(colorSpan.getCssValue('color')).
|
34587
|
+
expect(colorSpan.getCssValue('color')).toMatch(/rgba\(0, 0, 0, 1\)|rgb\(0, 0, 0\)/);
|
34419
34588
|
element(by.css('input[value=\'set color\']')).click();
|
34420
|
-
expect(colorSpan.getCssValue('color')).
|
34589
|
+
expect(colorSpan.getCssValue('color')).toMatch(/rgba\(255, 0, 0, 1\)|rgb\(255, 0, 0\)/);
|
34421
34590
|
element(by.css('input[value=clear]')).click();
|
34422
|
-
expect(colorSpan.getCssValue('color')).
|
34591
|
+
expect(colorSpan.getCssValue('color')).toMatch(/rgba\(0, 0, 0, 1\)|rgb\(0, 0, 0\)/);
|
34423
34592
|
});
|
34424
34593
|
</file>
|
34425
34594
|
</example>
|
@@ -36428,4 +36597,4 @@ $provide.value("$locale", {
|
|
36428
36597
|
|
36429
36598
|
})(window);
|
36430
36599
|
|
36431
|
-
!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style
|
36600
|
+
!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend(window.angular.element('<style>').text('@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}'));
|