I'll chime in here since I deal with these things in RL.
First, all gun propellants from any era work in vacuum. Slow match would work differently without air, it'd likely last longer. A lack of gravity to keep powder in the pan of a flintlock is the biggest problem I could see with any firearm type. Cap and ball would work fine. In free fall non cartridge firearms wouldn't have gravity to help with loading.
Space doesn't require exotic lubricants. Vacuum welding is a myth, events blamed on it early in Ranger and other such programs were actually insufficient lubrication, thermal binding, and so on.
Other effects aren't that bad, and unless you're looking at long cold soaks you don't need to worry about temperature. If you're going to be cold for a while, use no lubricant on the auto pistol.
20 degrees K would be a problem if you're submerged in cryo fluid or something like, but typically temp will be a problem for a suited user before the gun. If you light off a round in cryo fluid be prepared for plenty of gas expansion, the waste heats' going to put plenty of it through phase change. But the question was about vacuum.
The cold of space is a matter of radiation, not conduction or convection of the heat. So your gun won't stop working because you take it out the airlock. If you have a full auto firearm it'll not cool as efficiently than in the atmosphere if it relies on air cooling. So it'll overheat faster, and take longer to cool again.
Many polymers don't stand up well to space. Covering the polymer with some metal tape is an easy quick-fix. I doubt a Glock would have any problems with brief exposure, though. LDPE and MDPE is what I'm used to the problems being with, for the most part.
Anyway, your garden-variety firearm works fine in vacuum. If you're going to hang out there for some time, shoot the gun dry and deal with the wear or use a good low-temp non-petroleum grease. Silicon, TFE or graphite, perhaps.
I think I'd pick shooting dry on a gun with a steel slide and aluminum receiver by choice, but lots of commonly available things would work. You can get your grease at the bicycle shop when you're dirtside if there's no gun shop handy.