I learned about OpenEMR when I was on the FreeBSD website reading the porter’s handbook. There was a list of requested applications for which a FreeBSD port currently does not exist, and OpenEMR was on that list. I said, “what is that?” and discovered OpenEMR…
I am currently a practicing optometrist in rural NW Missouri, USA and I am evaluating whether OpenEMR would / could be a viable replacement for our current EHR (Revolution EHR). Optometry is my 2nd career – prior to this I had 12 years experience working as a software engineer. My first job was working with Medical Manger software, after that, I had data warehouse experience at Sprint PCS. The first versions of Linux were posted when I was a college student, and I’ve used FreeBSD for one reason or another at least since FreeBSD version ~6. Furthermore, my brother may or may not be a FreeBSD developer with 30 years experience…
I have Open EMR running successfully on my FreeBSD 14.0BETA4 box with Apache 2.4 ; MariaDB 10.11 ; php 8.2, and before I started working on making a FreeBSD port for OpenEMR, I thought I’d reach out to ensure I’m not duplicating efforts, etc…
I took some time today to try the docker method – it is much easier than trying to make sure I have all the correct software installed, etc. The only drawback is docker doesn’t run on FreeBSD – it is possible to run OpenEMR in a docker which is running on a linux VM inside of FreeBSD as I discovered.
In the process, I think I’ve verified a bug in OpenEMR…
login to OpenEMR
hover on the current user icon in the upper right corner → MFA Management.
click the Add new… → TOTP Key
type the password and press the <ENTER> key on your keyboard.
Enjoy the blank screen… (this is the bug)
Repeat all the above steps, only after typing your password, use the mouse to click the <Submit> button, and NOW you see the QR code to set up your authenticator…
This bug was DRIVING ME CRAZY when I was trying to install everything by hand on my FreeBSD box. I could replicate the same behavior on my Windows 10 box under XAMPP.
The behavior is the same when running in docker.
I have replicated this with multiple browsers: Firefox, Edge, Safari, Vivaldi. I do not run Chrome. Multiple operating systems: FreeBSD, Linux, Windows, MacOS, iPhone
Are you pressing <tab> AFTER you type your password and BEFORE you hit <ENTER>? It does not work if you leave the cursor in the password field and hit your <ENTER> button. It DOES work if you tab to the “SUBMIT” button and then hit your <ENTER> button.
i’ve replicated it as well: firefox on opensuse linux - running with docker - latest development files 7.0.2-dev. clicking ‘submit’ works ok - and in this case i happened to have typed in the wrong password.
On your site, change line 99 of mfa_totp.php onsubmit to match submit click - doregister(‘reg2’).
Since doregister calls restoreSession before dom submit, this will sync event actions.
Turns out you remove the “type=button” from the Submit button, you also remove the onclick="" from the submit button. This turns that button into the Submit for the form, you then put the function call that was in the onclick="" part of the button – move that up to line 99 for the onsubmit="", and that fixes everything…
I think I’ve opened a Pull Request #6916. (first time). Can someone let me know if I did it correctly?