Skip to content

Comments

fix: misc fixes#96

Merged
BenjaminMichaelis merged 1 commit intomainfrom
bmichaelis/updates
Feb 21, 2026
Merged

fix: misc fixes#96
BenjaminMichaelis merged 1 commit intomainfrom
bmichaelis/updates

Conversation

@BenjaminMichaelis
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR bundles a few small fixes across the trydotnet test helpers, styles, editor dev dependencies, and the microsoft-learn mock interactivity layer.

Changes:

  • Renames the loop variable in the multi-editor session factory for consistency/readability.
  • Consolidates .code-container / .code-container-inline styling and fixes padding: 01px to 1px.
  • Hardens trydotnetUrl / trydotnetOrigin URL parameter handling in the microsoft-learn mock to reduce unsafe overrides.
  • Bumps chai from 4.3.6 to 4.5.0 in the trydotnet editor package.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/microsoft-trydotnet/test/sessionFactory.ts Minor naming consistency in the multi-editor ready-session helper.
src/microsoft-trydotnet-styles/sass/trydotnet.scss Deduplicates code container styles and fixes invalid-looking padding value.
src/microsoft-trydotnet-editor/package.json Updates chai devDependency version.
src/microsoft-learn-mock/src/interactivity/originalCode.ts Adds validation for URL query params to avoid unsafe origins/URLs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Validate the trydotnetUrl query parameter to only allow relative paths
starting with '/' (but not '//') to prevent injection of arbitrary
script URLs (e.g., https://evil.com/malware.js, javascript:, data:).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Fix client-side URL redirect vulnerability in getUrls()

Validate trydotnetOrigin query parameter to prevent postMessage
redirection to malicious origins. Only allow HTTPS origins under
*.microsoft.com domain. Invalid or non-matching origins fall back
to the default https://trydotnet.microsoft.com.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Bump chai, fix SCSS quality issues, fix naming inconsistency

- Bump chai from 4.3.6 to 4.5.0 in microsoft-trydotnet-editor
- Fix leading zero in padding (01px -> 1px) in trydotnet.scss
- Consolidate duplicate .code-container and .code-container-inline rules
- Fix editorIframe -> editorIFrame casing in test/sessionFactory.ts
@BenjaminMichaelis BenjaminMichaelis merged commit a67afe0 into main Feb 21, 2026
11 checks passed
@BenjaminMichaelis BenjaminMichaelis deleted the bmichaelis/updates branch February 21, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant