Being in space can have weird and sometimes harmful effects on the human body, and we'll have to work through those issues if we're to make it out to Mars and beyond, and stay healthy.

But it looks like we have finally found one feature of the human body that's untroubled by microgravity - and it's a part of our all-important immune system.

Based on a study of blood samples from International Space Station (ISS) crew members, a few months in space don't affect B-cell immunity - the number of white blood cells in our bodies ready to fight off infection by producing antibodies.

This is great news, because it means we should stay well protected against bacteria and viruses out in space. It also suggests vaccinations should be effective in space too, though there are still plenty of unknown variables to consider.

"Long-duration orbital spaceflights are associated with increased levels of psychological stress, acute and chronic exposure to space radiation and microgravity-induced changes, all of which are known to detrimentally impact the immune system," says one of the team, Guillaume Spielmann, from Louisiana State University (LSU).

Of course, the immune system can take a battering here on Earth as well: when we don't eat healthily enough, for example, or don't get enough sleep, that can make us more vulnerable to a bout of sickness.

And previous research had suggested our immune systems can get confused out in space, with some immune cells becoming less active and some becoming more active. Before we set off on extended journeys through the cosmos, we need to know more about the potential risks, and this latest study should help.

One of the strengths of the new research is its extended duration. The study looked at 23 astronauts over six months – before, during, and after they were on board the ISS.

"This is the first study to comprehensively show that long-duration spaceflight in human astronauts has limited effect on B-cell frequency and antibody production," says one of the researchers, John Campbell from the University of Bath in the UK.

While the researchers say further studies are needed to look at longer trips outside of Earth's atmosphere, it's a promising finding if we want to start to explore the Universe.

Face-hugging aliens might still pose a problem, but at least when it comes to bacteria and viruses, we could be able to fight them off just as well as we do on Earth.

There's now a growing amount of research into long-term spaceflight and human health. Studies have shown the human body loses bone density in space, while the risk of cancer increases (thanks to the Sun's radiation), and more fluid flows up to the head (one of the effects of microgravity).

Three of the crucial parts of a healthy lifestyle – exercise, sleep, and diet – are a lot harder to control and keep on top of when you're out in space. There's nowhere to go for a weekly 5K run, for example.

The more we know about the immune system in space, the better we can protect it. Extra medications or nutritional supplements have been suggested as ways of guarding astronauts against illness – but now we know a bit more about the body's natural defences out in space too.

The research has been published in the Journal of of Applied Physiology.