Skip to content

BAH-4360 | Decrypting form events from base 64 before evaluation and execution#112

Merged
angshu merged 8 commits into
masterfrom
BAH-4360
Dec 29, 2025
Merged

BAH-4360 | Decrypting form events from base 64 before evaluation and execution#112
angshu merged 8 commits into
masterfrom
BAH-4360

Conversation

@angshu

@angshu angshu commented Dec 24, 2025

Copy link
Copy Markdown
Member
  • removed the script evaluation in Container.jsx componentWillMount() method to constructor() as any error will result in complete breakdown. Moving to componentDidMount does resolve the problem but will re-render the entire form. Constructore seems to be just fine.
  • added encodingutils to convert utf8 to base64 and visa versa
  • updated scriptRunner to convert base64 to utf8
  • updated effected tests

- removed the script evaluation in Container.jsx componentWillMount() method to constructor() as any error will result in complete breakdown. Moving to componentDidMount does resolve the problem but will re-render the entire form. Constructore seems to be just fine.
- added encodingutils to convert utf8 to base64 and visa versa
- updated scriptRunner to convert base64 to utf8
- updated effected tests
@angshu angshu changed the title - Decrypting form events from base 64 before evaluation and execution BAH-4360 | Decrypting form events from base 64 before evaluation and execution Dec 24, 2025
Comment thread src/components/Container.jsx Outdated
this.setState({ data: updatedTree });
try {
updatedTree = new ScriptRunner(this.state.data, this.props.patient).execute(initScript);
updatedTree = executeEventsFromCurrentRecord(updatedTree, updatedTree, this.props.patient);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@angshu the executeEventsFromCurrentRecord function seems to be moved inside the if block so that it gets executed only when there is a onFormInit event. Is this intentional? Previously it seems to be invoked outside of if.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah, it should be outside. will fix

@angshu angshu merged commit 9ddad22 into master Dec 29, 2025
2 checks passed
@angshu angshu deleted the BAH-4360 branch December 29, 2025 10:44
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.

2 participants