Skip to content

Illegal Major/Minor Values in Sample Beacon #4

@Minty123

Description

@Minty123

It is possible to enter a sample beacon on the web admin interface with illegal values (i.e. major/minor > 65.535). This makes the app crash on the beacons tab when it tries to add a new region in the SDK (ClientsManager.addNewRegion)

See the method's code below:

private void addNewRegion(BeaconModel bm) {
        Region region = new Region(bm.getUniqueId(), Identifier.parse(bm.getProximityUUID()), Identifier.parse(bm.getProximityMajor().toString()), Identifier.parse(bm.getProximityMinor().toString()));
       ...
}

In my example, neither the ProximityUUID nor the major/minor could not be parsed. Maybe more checks and a message to the user should be added? However, I was able to fix to ProximityUUID by using Identifier.fromUuid(UUID.fromString(bm.getProximityUUID())). Maybe the web interface should also not accept illegal values for major/minor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions