Skip to content

Incident accepted even if user doesn't exist #50

@add118

Description

@add118

User "Franky" doesn't exist, and I tested sending an incident as this user. The app displays that the incident was sent. Upon checking the nohup.out file I get an exception message.

java.io.OptionalDataException
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1363)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
        at Communication.CommSocket.run(CommSocket.java:117)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Client Connected
Creating new Post failed
Client Connected
IO Exception:
java.io.OptionalDataException
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1363)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
        at Communication.CommSocket.run(CommSocket.java:117)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Client Connected
Creating new Post failed

Server throws proper exceptions but does not inform the app about the failure. Point of failure is in DBAccess in the method newPost(channel, owner, poster). Like Connor said on Telegram, using a non existent user causes problems. I know that once login works this shouldn't be an issue, but it feels wrong having the app tell the user the incident was sent without issue.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions