Skip to content

Form components#35

Draft
xanthipe wants to merge 7 commits intomainfrom
feat/27-basic-auth-flow
Draft

Form components#35
xanthipe wants to merge 7 commits intomainfrom
feat/27-basic-auth-flow

Conversation

@xanthipe
Copy link
Contributor

@xanthipe xanthipe commented Apr 1, 2024

Issues affected

Closes #29, #22, #31, #32, #33, #34

Description

I forgot to stop. A fairly large chunk of the input form components, plus some more basic page chrome, plus the Markdown-out component.

How to test

Run up Storybook and poke around. There are also a few unwired auth pages to look at.

Screenshots

Any other information?

Checklist

  • Have all new components been added to Storybook?
  • Have unit/component/integration tests been written?
  • Has documentation been updated?

@xanthipe xanthipe changed the title Feat/27 basic auth flow Form components Apr 1, 2024

export const WrappedMarkdown = ({ text }: WrappedMarkdownProps) => {
const cleanText = text
.replace(/<\/?script>/g, 'Naughty!')
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems quite permissive as sanitization - does it work with newline/null char injection etc? Are there any other filter evasion techniques we could nix with this (I'm guessing we're limited in sanitization due to it being html content)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've done some more read-around on the component, and I can explicitly block tags and their content a lot more easily than I did here. For the most part it's not that big an issue - we're not allowing direct use of html in the editor for one - so this is more an emergency backstop in case someone does an API intercept.

Choose a reason for hiding this comment

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

Is it worth just throwing a big old list of XSS attacks at the function and seeing what happens? There's a few example repos out there with various lists of attacks, e.g. this one

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.

Markdown component

3 participants