For week 6, I had a few setbacks in terms of running the OpenMRS SDK, but later in the week had some success in managing to edit the webpage in the code and have my changes reflected on the page. I have also done some research on how to fix XSS attacks.
Unfortunately this week I had several issues with running the SDK. The first issue was to do with Docker and connecting to the database, and the second was a Tomcat problem when attempting to run the SDK.
To fix these issues, I deleted the Docker container I was using and created a new one, as my version of Docker had recently updated and this was causing problems. I then deleted the SDK I was using and restarted it, which fixed the Docker problem, but drew by attention to the Tomcat error. It turned out that this error had been caused by a missed setting in the SDK setup, so I went back and repeated the setup process properly, and it ran.
Editing the Webpage:
To make sure I was looking at the right code and to check I could view changed made properly, I decided to add a line of HTML in to display a header on the webpage. This was my code:
And this was the successful result:
My edit can be seen in the top left, just above the patient’s name.
I deleted the line of HTML so I don’t accidentally leave it in when submitting a PR later. I then researched some ways to protect against XSS attacks and have decided to try escaping special characters, which I will explain in greater detail in next week’s blog.
Next week I am focusing on fixing and submitting a PR for the XSS vulnerability.