Autism and confidentiality

Hi all, first post here in a long time. I am a 17-year-old autistic person, diagnosed at 12.

I have a long-term issue with keeping secrets and respecting boundaries. When people tell me personal stories, I find myself repeating them to others and *then* realising that I need to keep my mouth shut. It's not indiscriminate- I wouldn't be with a group of friends and tell them about someone's trauma, for example- but it is an issue. I realised this today when I was talking to my mother about my partner, and I shared a personal story that my partner had told me. My mother is never going to bring it up or tell anyone else, but it was still a crap move. I don't even know why I do this- I just have information that I think is relevant to a conversation, so I share it. It's not to gossip or for attention, I just bring it up because I think it will be useful. Does anyone else do this? How do you manage it?