A candidate for state representative on Saturday said a security breach that was sending visitors to her campaign's mobile website to a pornographic site has been fixed.

Trish Vanaria, a Republican from Hopkinton running for the 8th Middlesex District seat, said she doesn't know how long the glitch had existed before she caught onto it Friday night. She added she had not been contacted by anyone about the problem until the Daily News reached her that evening.

"It's just one of those things that floats around the Internet" and preys on vulnerable sites, she said of the security breach, which only affected her campaign's mobile website that shows up on smartphones and tablets. "I'm hoping (the people who encountered it) were few and far between."

The redirect from her site to a porn site was in effect as late as around 8:30 p.m. Friday. Vanaria said the IT specialist managing her site fixed the issue within a half hour, and has since beefed up the site's security code to prevent another hack from happening.

Vanaria is running against incumbent Democratic state Rep. Carolyn Dykema. The district represents Holliston, Hopkinton, and precincts in Medway, Southborough and Westborough.

Scott O'Connell can be reached at 508-626-4449 or soconnell@wickedlocal.com. Follow him on Twitter: @ScottOConnellMW