Over the last decade, Orange County issued 65,171 permits to carry a concealed handgun and both Fresno and Sacramento counties issued more than 45,000.

San Francisco issued 11.

That’s according to data published online Monday by the California Department of Justice, but which has since been removed after reporters discovered that the open database included the names, home addresses and other personal information of more than 200,000 concealed carry permit holders in the state.

The wide variation across counties was at the heart of last week’s U.S. Supreme Court opinion, which struck down New York state’s concealed carry permitting scheme, which is very similar to California’s and which gave local law enforcement sweeping discretion to determine who should be allowed to tote a hidden handgun in public.

In California county sheriffs have been the most common adjudicators of whether an applicant has “good cause” to receive a concealed carry permit. In counties with conservative sheriffs, including Orange and Sacramento, they have used that discretion to issue these permits to any applicants who qualify on paper. In San Francisco, concealed carry permits are virtually nonexistent.

The court’s ruling last Thursday is forcing San Francisco’s sheriff’s department to behave more like Orange County’s — at least until state lawmakers pass new legislation.

On Friday, Attorney General Rob Bonta advised all county sheriffs and police chiefs in the state that they “may no longer require a demonstration of ‘good cause’ in order to obtain a concealed carry permit.”

California law also requires applicants to undergo a background check, take a safety course and satisfy a “good moral character” standard, often interpreted to disqualify those who have committed violent felonies or are the subject of restraining orders. In his Friday memo, Bonta stressed that licensing authorities are still obligated to enforce those other requirements.

But the statewide standards are likely to get beefed up soon.

Tuesday, Sen. Anthony Portantino, a Democrat from Glendale, introduced legislation that he said would “update” the state’s concealed carry law to make it more restrictive, while also complying with the highest court’s latest dictate.

The bill, which was authored by Bonta’s office, would create a new statewide application process that explicitly disqualifies applicants who have committed certain felonies or are the subject of restraining orders. Applicants would also need to be at least 21, provide three character witnesses and take an additional firearm storage and safety course.

Beyond the additional hurdles required of applicants, the bill would expand the number of designated “sensitive places” where even a concealed carry license holder would not be allowed to take their firearms. That exception is taken directly from the Supreme Court ruling, which held that the government is allowed to prohibit guns in certain areas, namely schools and government buildings.

Portantino’s Senate Bill 918 would deem all the following “sensitive”: all school grounds, college and university campuses, government and judicial buildings, medical facilities, public transit, public parks, playgrounds, public demonstrations and any place where alcohol is sold.

Some gun rights advocates disagree that the new rules are consistent with the court’s new standard. “It’s not an improvement on California’s concealed carry laws, it’s in defiance of this court opinion,” Dan Reid, a lobbyist with the National Rifle Association, said at Tuesday’s Assembly Public Safety committee hearing on the bill.

The bill passed the committee along party lines, with all Democrats voting in favor. Lawmakers will take it back up in August when they return from the summer recess.

If passed into law, concealed carry licenses could be more onerous to acquire in counties where permits have been issued relatively freely, even while the most restrictive counties will likely be required to issue more. That would close a particularly wide chasm between the urban Bay Area and much of rural northern California. Most Bay Area counties have issued fewer than 60 licenses per 100,000 residents since 2012, according to the new Department of Justice data.

It’s more than 10,000 per 100,000 residents in Shasta, Modoc, Tehama, Inyo, Sierra, Calvareas, Plumas, Siskiyou, El Dorado, Tuolumne and Mariposa counties.

These numbers were published by the state’s Attorney General on Monday through a new “2022 Firearms Dashboard Portal,” which also included information about domestic violence restraining orders and registered firearm vendors.

“Transparency is key to increasing public trust between law enforcement and the communities we serve,” Bonta said in a press release touting the new data tool.

But Tuesday, gun rights and conservative media outlets pointed out that the dashboard allowed users to access the personal information of thousands of concealed carry license applicants.

The Department of Justice public data portal was still offline as of this morning. And after numerous requests for comment, the Attorney General’s press office issued an unsigned statement Tuesday saying that it was a mistake to expose the personal information and it is investigating.

“Any unauthorized release of personal information is unacceptable,” the statement said. “We are working swiftly to address this situation and will provide additional information as soon as possible.”

The full database was not directly available through the interactive dashboard, but on Monday users could navigate to a menu allowing them to download nearly 600,000 records. The file included the full legal name, birthdate, home address, age and, if specified, race and ethnicity of at least 242,727 individual applicants. Among those applicants, at least 140 are current or former judges.

Butte County Sheriff Kory Honea, president of the California State Sheriffs’ Association, said that he reached out to the California Department of Justice after being notified of the data release. He said a department official assured him that the release of the personal information was “not intentional” and that the department was “taking steps to mitigate the damages that may have resulted.”

But Chuck Michel, president of the California Rifle & Pistol Association, the state chapter of the National Rifle Association, said there could be legal consequences for the state.

“The judge disclosures are illegal,” he said, referring to a state law that prohibits the state from publishing the home address of an elected or appointed official without their permission.

He added that even for ordinary license holders, the disclosure could raise safety concerns.

“You basically advertise to criminals: ‘There’s a gun; here, come take it,’” he said.

Assembly Republican leader James Gallagher of Yuba City demanded that the attorney immediately correct “this egregious error,” which he called “uttery infuriating.”

“Time and time again, our state government has proven to be irredeemably irresponsible with the most sensitive information,” Gallagher said in a statement. “Why should we have any faith in them for any kind of accountability, let alone keep an up to date, secure database of gun owners’ information?”

Nathan Hochman, Bonta’s Republican opponent in the November election, piled on this morning, tweeting that Bonta had “endangered firearm permit holders statewide, such as judges, reserve officers and domestic violence victims.”

CalMatters is a nonprofit, nonpartisan newsroom committed to explaining California policy and politics.