Skip to content
This repository was archived by the owner on Mar 27, 2020. It is now read-only.

Fix #30.2 Fix rounding in ChallengeSolution.ClearanceQuery #33

Merged
merged 1 commit into from
May 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CloudFlareUtilities/ChallengeSolution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public ChallengeSolution(string clearancePage, string verificationCode, string p

public double Answer { get; }

public string ClearanceQuery => $"{ClearancePage}?jschl_vc={VerificationCode}&pass={Pass}&jschl_answer={Answer.ToString(CultureInfo.InvariantCulture)}";
// Using .ToString("R") to reduse answer rounding
public string ClearanceQuery => $"{ClearancePage}?jschl_vc={VerificationCode}&pass={Pass}&jschl_answer={Answer.ToString("R", CultureInfo.InvariantCulture)}";

public static bool operator ==(ChallengeSolution solutionA, ChallengeSolution solutionB)
{
Expand Down