SafeExamBrowser / seb-mac

Safe Exam Browser for macOS and iOS
https://www.safeexambrowser.org/macosx
100 stars 40 forks source link

Inconsistencies when calculating Config Key Checksum #293

Closed lopezbertoni closed 1 year ago

lopezbertoni commented 1 year ago

Hi.

I'm trying to calculate the checksum of the sebclientsettings.seb file.

I'm following the instructions in here.

To troubleshoot I created a SebClientSettings.seb file in a mac and looked at the logs to extract the JSON it generated.

When converting a mac config file to the seb-json file found a couple of discrepancies.

  1. The property browserMessagingSocket has a value of ws:\localhost:8706 in the .seb file but it's converted to ws:\\localhost:8706 - This is stated in the docs that we shouldn't escape back slashes so I think we're good on this one.
  2. The properties defaultPageZoomLevel and defaultTextZoomLevel are set to 'real' with a value of 1 so when converting to seb-json they have a value of 1.0. The question is, if the decimal is a whole number, is the expectation to not have any decimals (basically convert it to an int)?
  3. The property examKeySalt is set to data. When checking the .seb file it has a value of lXBsG3Oq6qyaXfjdSqy5BTrbLTLuvM4d+y5ZuuW7YQc=. The generated seb in the logs have the same value. The docs indicate that plist XML elements must be converted to Base64 strings. Is this valid or am I missing something? The fix is easy I just want to make sure I'm doing the right thing.
  4. The property urlFilterRegex has a value of true in the .seb file, it has a value of false in the seb-json from the logs. This might be a bug.

Thanks a lot for the help so far.

org.safeexambrowser.SafeExamBrowser 2023-03-31--12-22-24-396.log SEBClientSettings-MAC.txt mac-seb.txt

dbuechel commented 1 year ago

I reckon this is a macOS-related issue, thus transferring it to the macOS repository.

danschlet commented 1 year ago

Unfortunately we cannot give individual support for implementing such features (only to SEB Alliance Gold Members or higher). Please try your assumptions and if you get really, really stuck, you can ask here again about a clearly defined case.

Regarding your question 2 we just recently had a look at that. Looks like the JSON converters in SEB for macOS/iOS and Windows both use the lowest precision possible, so 1.0 becomes 1.

4) In the Mac version the default is false. But that's irrelevant for the Config Key.

lopezbertoni commented 1 year ago

@danschlet Thanks a lot for the feedback so far. Upon further digging it looks like we can accomplish the dynamic start url feature by using the query string parameter (https://safeexambrowser.org/windows/win_usermanual_en.html#ExamPane). This should allow us to just our start url to the sebs://{sebs-file-url}?{launchurl} and we can store the checksum in our server for that specific file which I guess we're going to get from the config tool.