I am in the military and due to the corona pandemic I've been staying at my house for 2 months with full pay. Only left the house to buy food. Since everything is closed down I couldn't get a haircut for the past 2 months so my hair is a bit too long for military standards and I am aware of it. So today I got back to work and I got shit from one of my superiors as soon as he saw me. He said stuff like "what is that thing on your head" "do you know you have to get a haircut" "when are you getting a haircut?" in a disrespectful tone. Problem is there were other colleagues with us who were laughing and that made me feel like an idiot because I couldn't talk back to him without getting myself in trouble. I know I have to cut my hair but for ffs everything is closed down and going to a barber friend's house is risky because the police can fine me.

I feel like shit now because at that moment I felt powerless. What should I do in these type of situations where someone higher than you in rank treats you like disposable trash?