internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: cisagov/manage.get.gov

Issue:
Security emails aren't making it to WHOIS
### Current Behavior

Thousands of domains with security emails are showing `REDACTED FOR PRIVACY` in WHOIS. 

### Expected Behavior

If a domain has a security contact that isn't dotgov@cisa.dhs.gov, they have opted to have that email published and it should appear in WHOIS.

### Steps to Reproduce

1. Ask WHOIS about get.gov:
```
$ whois -g get.gov|grep "Security Email"
```
2. See a redacted response:

`Security Email: REDACTED FOR PRIVACY`

Querying for igorville.gov will show up correctly because the field has been manually set to `disclose` in the registry admin portal:
```
$ whois -g igorville.gov|grep "Security Email"
```
`Security Email: help@get.gov`

### Environment

Stable

### Additional Context

@abroddrick confirmed the tag was being disclosed correctly as it left our registrar. It's possible the registry admin panel is overriding our setting. See [Slack convo](https://cisa-corp.slack.com/archives/C05TS76RVS6/p1702399532090829?thread_ts=1702396340.398449&cid=C05TS76RVS6).


### Acceptance Criteria

- [ ] unlike normal bugs this can be used as just a discovery to determine the cause of the issue, and a follow on ticket can be made for solution as needed. 

### Issue Links

blocks #1535 


Discussion:
Discovery in sprint 35 and worked in sprint 36.

Resolving patch:
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -721,8 +721,10 @@ def _update_epp_contact(self, contact: PublicContact):
             email=contact.email,
             voice=contact.voice,
             fax=contact.fax,
+            auth_info=epp.ContactAuthInfo(pw="2fooBAR123fooBaz"),
         )  # type: ignore
 
+        updateContact.disclose = self._disclose_fields(contact=contact)  # type: ignore
         try:
             registry.send(updateContact, cleaned=True)
         except RegistryError as e:


Test patch:
diff --git a/src/registrar/tests/common.py b/src/registrar/tests/common.py
--- a/src/registrar/tests/common.py
+++ b/src/registrar/tests/common.py
@@ -1094,6 +1094,8 @@ def _convertPublicContactToEpp(self, contact: PublicContact, disclose_email=Fals
                 email=contact.email,
                 voice=contact.voice,
                 fax=contact.fax,
+                disclose=di,
+                auth_info=ai,
             )
 
     def tearDown(self):
Repository: cisagov/manage.get.gov

Issue:
"No other employees" request page textbox does not have character limit
### Current Behavior

1. The "No other employees from your organization?" (no_other_contacts/) request page's textbox does not currently have a character limit nor a warning message for going over 1000 characters as seen in other pages. Demo:

![video1981264903](https://github.com/cisagov/manage.get.gov/assets/140533113/e6521f2f-016c-42dd-b8b9-407f74d0a9cf)

2. Related, it is also missing a character counter for the textbox, as shown here: 

![noOtherEmployees](https://github.com/cisagov/manage.get.gov/assets/140533113/c236aab7-4a24-47f3-91f0-99a7d3986bdb)


### Expected Behavior

Like in other pages with text boxes ("Purpose" or "Anything else?"), if user surpasses character limit, there should be an error message (shown below) and user would not be able to progress: 
![video1045926427](https://github.com/cisagov/manage.get.gov/assets/140533113/180128f9-35ca-448e-98ef-6dc5c58b35eb)


There should be a character limit and counter under the textbox:
![purpose](https://github.com/cisagov/manage.get.gov/assets/140533113/9bd12b35-92d5-4f93-8859-ae122e300279)

### Steps to Reproduce

Visit the /no_other_contacts page of the request flow


### Environment

_No response_

### Additional Context

_No response_

### Issue Links

Can be impacted by... 
- #661 
- #1480 


Discussion:

Resolving patch:
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -610,6 +610,12 @@ class NoOtherContactsForm(RegistrarForm):
             "we can contact to help us assess your eligibility for a .gov domain."
         ),
         widget=forms.Textarea(),
+        validators=[
+            MaxLengthValidator(
+                1000,
+                message="Response must be less than 1000 characters.",
+            )
+        ],
     )
 
 


Test patch:
Repository: cisagov/manage.get.gov

Issue:
Fix capitalization for "Domain Information" page title in admin portal
### Current Behavior

Currently, the page is titled "Domain Information" - with both words capitalized. It should be in sentence case with "information" in lowercase. 

What it currently looks like: 
![information_capitalized](https://github.com/cisagov/manage.get.gov/assets/140533113/176c5659-ce81-4376-9388-89d8b1e19eed)



### Expected Behavior

The word "information" should be lowercase, as shown here: 
![information_lowercase](https://github.com/cisagov/manage.get.gov/assets/140533113/85cdbec8-0145-4a8d-bb72-f0f81fc3e459)


### Steps to Reproduce

Page title seen in the home page of the admin dashboard


### Environment

_No response_

### Additional Context

_No response_

### Issue Links

_No response_


Discussion:
Likely this comes from the `verbose_name_plural` set on https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/models/domain_information.py#L247 and can be changed there.

Resolving patch:
diff --git a/src/registrar/migrations/0058_alter_domaininformation_options.py b/src/registrar/migrations/0058_alter_domaininformation_options.py
new file mode 100644
--- /dev/null
+++ b/src/registrar/migrations/0058_alter_domaininformation_options.py
@@ -0,0 +1,16 @@
+# Generated by Django 4.2.7 on 2023-12-27 22:26
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+    dependencies = [
+        ("registrar", "0057_domainapplication_submission_date"),
+    ]
+
+    operations = [
+        migrations.AlterModelOptions(
+            name="domaininformation",
+            options={"verbose_name_plural": "Domain information"},
+        ),
+    ]
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -245,4 +245,4 @@ def create_from_da(cls, domain_application, domain=None):
         return domain_info
 
     class Meta:
-        verbose_name_plural = "Domain Information"
+        verbose_name_plural = "Domain information"


Test patch:
Repository: cisagov/manage.get.gov

Issue:
Redirect logout to {beta.}get.gov info site
Now that we have the `cloud.gov Pages` site setup at get.gov, we should redirect logout actions to that site. 

As a logged-in user of the registrar
I want to be redirected to the new get.gov informational site when I log out
So that I stay in the .gov experience rather than login.gov

AC:
- [ ] **Given** a logged-in user on the .gov registrar, **when** I logout and also choose "Yes, sign out of login.gov," **then** I am redirected to the get.gov as an unauthenticated user.
- [ ] Language on login.gov screen reads "Do you want to sign out of Login.gov and return to **get.gov**?



![Image](https://github.com/cisagov/manage.get.gov/assets/62573986/9964a4dd-03db-4044-9e7e-55f6503c9748)

### Additional Context:
Currently, if we select to "return to the .gov registrar," we go back to login.gov.... and if we select to go back to the .gov registrar, we get a nasty 401 error because we aren't logged in anymore.

### Links to related issues
🔄 #1509 


Discussion:
@PaulKuykendall, the change needed to resolve this issue happens in manage.get.gov (see https://developers.login.gov/oidc/logout/), so I've changed the "Product/Component" value from `(beta.)get.gov` to `manage.get.gov`.
The docs I shared above look like the right answer, but @abroddrick should confirm before we get to next sprint. 

I'm fairly certain that if we resolve this, we also resolve https://github.com/cisagov/manage.get.gov/issues/1509
confirmed that this documentation seems like the right approach and I agree it may resolve 1509 as well
I think that the least disruptive setting is to use Django's `LOGOUT_REDIRECT_URL` setting and keep the Login.gov configuration as redirecting to the current URL of https://manage.get.gov/openid/callback/logout/. That keeps the staging and production Login.gov configurations most parallel. Asking on Slack if we can just use one setting for all of our environments.

Resolving patch:
diff --git a/src/registrar/config/settings.py b/src/registrar/config/settings.py
--- a/src/registrar/config/settings.py
+++ b/src/registrar/config/settings.py
@@ -519,7 +519,7 @@
 ]
 
 # where to go after logging out
-LOGOUT_REDIRECT_URL = "home"
+LOGOUT_REDIRECT_URL = "https://get.gov/"
 
 # disable dynamic client registration,
 # only the OP inside OIDC_PROVIDERS will be available


Test patch:
Repository: cisagov/manage.get.gov

Issue:
Content Review: Request flow pages
### Issue description

Review the pages identified within the following sections of [this spreadsheet](https://docs.google.com/spreadsheets/d/18wwmEioSr6BU9Y6G6ihqzS7P1OaE65Ifoipg9-Gxcjo/edit#gid=1246252690) (under "Registrar" tab):

- Domain request
- Error pages

While reviewing those sections, also review the content that appears on any linked pages that lead to beta.get.gov. For example, the "Authorizing Official" page links to a corresponding page on beta.get.gov. Review that content, as well, to ensure the information is accurate. 

Use the [Content Review Checklist](https://docs.google.com/document/d/13JrJZOAQCkt-G5zKiIzBoNg_4ZJm_-FxGH2aN2fS86s/edit#heading=h.41lgwrhbhke5) as a guide for doing the review.


### Acceptance criteria

- [x] All pages identified for "Domain request" and "Error pages" have been reviewed and updates have been made in GitHub.
- [x] All linked pages that lead to beta.get.gov have also been reviewed and updates have been made in GitHub
- [x] The status for each reviewed page is updated in [this spreadsheet](https://docs.google.com/spreadsheets/d/18wwmEioSr6BU9Y6G6ihqzS7P1OaE65Ifoipg9-Gxcjo/edit#gid=1246252690) to indicate the outcome of the review.
- [x] Any dev tickets identified during the review have been created.

### Additional context

_No response_

### Links to other issues

URLs for this content review will be gathered via this ticket #1244 


Discussion:

Resolving patch:
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -170,7 +170,7 @@ class TribalGovernmentForm(RegistrarForm):
     )
 
     tribe_name = forms.CharField(
-        label="What is the name of the tribe you represent?",
+        label="Name of tribe",
         error_messages={"required": "Enter the tribe you represent."},
     )
 


Test patch:
Repository: cisagov/manage.get.gov

Issue:
Hide default security email on reports
### Issue description

On our reports we are showing security emails for each domain, however our system sets a default security email of dotgov@cisa.dhs.gov if the domain manager hasn't set a security email yet. The issue is we are showing this on the reports, which is very misleading as it looks like the domain manager set this email, which is not the case. Instead, we want it to show blank just as it is showing for the default email set be Cloudflare.

### Acceptance criteria

- on reports hide our internal security email by showing it as blank

### Additional context

[slack thread](https://cisa-corp.slack.com/archives/C05BGB4L5NF/p1705664753222419)

### Links to other issues

_No response_


Discussion:

Resolving patch:
diff --git a/src/registrar/utility/csv_export.py b/src/registrar/utility/csv_export.py
--- a/src/registrar/utility/csv_export.py
+++ b/src/registrar/utility/csv_export.py
@@ -38,7 +38,7 @@ def write_row(writer, columns, domain_info):
     if security_contacts:
         security_email = security_contacts[0].email
 
-    invalid_emails = {"registrar@dotgov.gov"}
+    invalid_emails = {"registrar@dotgov.gov", "dotgov@cisa.dhs.gov"}
     # These are default emails that should not be displayed in the csv report
     if security_email is not None and security_email.lower() in invalid_emails:
         security_email = "(blank)"
diff --git a/src/registrar/views/domain.py b/src/registrar/views/domain.py
--- a/src/registrar/views/domain.py
+++ b/src/registrar/views/domain.py
@@ -568,7 +568,9 @@ def get_initial(self):
         """The initial value for the form."""
         initial = super().get_initial()
         security_contact = self.object.security_contact
-        if security_contact is None or security_contact.email == "dotgov@cisa.dhs.gov":
+
+        invalid_emails = ["dotgov@cisa.dhs.gov", "registrar@dotgov.gov"]
+        if security_contact is None or security_contact.email in invalid_emails:
             initial["security_email"] = None
             return initial
         initial["security_email"] = security_contact.email


Test patch:
diff --git a/src/registrar/tests/test_reports.py b/src/registrar/tests/test_reports.py
--- a/src/registrar/tests/test_reports.py
+++ b/src/registrar/tests/test_reports.py
@@ -399,7 +399,7 @@ def test_export_domains_to_writer_security_emails(self):
             "adomain10.gov,Federal,Armed Forces Retirement Home,Ready\n"
             "adomain2.gov,Interstate,(blank),Dns needed\n"
             "ddomain3.gov,Federal,Armed Forces Retirement Home,123@mail.gov,On hold,2023-05-25\n"
-            "defaultsecurity.gov,Federal - Executive,World War I Centennial Commission,dotgov@cisa.dhs.gov,Ready"
+            "defaultsecurity.gov,Federal - Executive,World War I Centennial Commission,(blank),Ready"
         )
 
         # Normalize line endings and remove commas,
Repository: cisagov/manage.get.gov

Issue:
In the request form, make the behavior for submitting domain requests and alternates the same
### Issue description

In the request form, the "What .gov domain do you want?" and "Alternative domains (optional)" fields behave differently when given input. 
* `What .gov...`, the first field, requires a user to click "Check availability" before showing whether the desired domain is available. 
* `Alternative domains...` automatically shows the response a few moments after typing has stopped.

Implement the design approach to make the behavior for submitting domain requests and alternates the same. Design approach defined in figma.

### Acceptance criteria

- [ ] In the request form, the behavior for submitting domain requests and alternates are the same

### Additional context

[proto type ](https://www.figma.com/proto/v9EiY4kYfIHVWb8J58vXHS/Registrar%2FRequest%2F.gov-Domain?type=design&node-id=3-4259&t=1FVDm6ht1KQxFJc9-1&scaling=min-zoom&page-id=0%3A1&starting-point-node-id=3%3A4259)
[figma](https://www.figma.com/file/v9EiY4kYfIHVWb8J58vXHS/Registrar%2FRequest%2F.gov-Domain?type=design&node-id=0%3A1&mode=design&t=G0cZ3bAI9gEZck03-1) 
### Links to other issues

Reference #1495 (design ticket)


Discussion:

Resolving patch:
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/application_wizard.py
@@ -420,7 +420,7 @@ def clean_alternative_domain(self):
 
     alternative_domain = forms.CharField(
         required=False,
-        label="",
+        label="Alternative domain",
     )
 
 


Test patch:
Repository: cisagov/manage.get.gov

Issue:
Add spacing on "Address Line 1" and "Address Line 2" in Django Admin
### Current Behavior

On Django Admin, the DomainApplication object has incorrect spacing for the names of the "Address Line 1" and "Address Line 2" fields. 


### Expected Behavior

This spacing should be corrected from "Address Line1" and "Address Line2" to "Address Line 1" / "Address Line 2".

### Steps to Reproduce
Navigate to /admin, and click "Domain Application". Then, scroll to the "Organization name and mailing address" section and note the address fields


### Environment

_No response_

### Additional Context
![image](https://github.com/cisagov/manage.get.gov/assets/141044360/7ac51430-dba9-4e96-8360-4aefeb083c94)


### Issue Links

_No response_


Discussion:

Resolving patch:
diff --git a/src/registrar/migrations/0063_alter_domainapplication_address_line1_and_more.py b/src/registrar/migrations/0063_alter_domainapplication_address_line1_and_more.py
new file mode 100644
--- /dev/null
+++ b/src/registrar/migrations/0063_alter_domainapplication_address_line1_and_more.py
@@ -0,0 +1,24 @@
+# Generated by Django 4.2.7 on 2024-01-23 22:01
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+    dependencies = [
+        ("registrar", "0062_alter_host_name"),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name="domainapplication",
+            name="address_line1",
+            field=models.TextField(blank=True, help_text="Street address", null=True, verbose_name="Address line 1"),
+        ),
+        migrations.AlterField(
+            model_name="domainapplication",
+            name="address_line2",
+            field=models.TextField(
+                blank=True, help_text="Street address line 2 (optional)", null=True, verbose_name="Address line 2"
+            ),
+        ),
+    ]
diff --git a/src/registrar/models/domain_application.py b/src/registrar/models/domain_application.py
--- a/src/registrar/models/domain_application.py
+++ b/src/registrar/models/domain_application.py
@@ -431,11 +431,13 @@ class BranchChoices(models.TextChoices):
         null=True,
         blank=True,
         help_text="Street address",
+        verbose_name="Address line 1",
     )
     address_line2 = models.TextField(
         null=True,
         blank=True,
         help_text="Street address line 2 (optional)",
+        verbose_name="Address line 2",
     )
     city = models.TextField(
         null=True,


Test patch:
Repository: cisagov/manage.get.gov

Issue:
Handle www. prefix when input in /availability API
[PR#100 in getgov-home for additional context
](https://github.com/cisagov/getgov-home/pull/100)
Handle edge case of including [www](http://www/). in the search input. This is most likely best handled by updating the manage.get.gov's availability endpoint to handle the [www](http://www/). prefix when parsing arguments, similarly to how the API handles the .gov suffix.

Per Katherine:
 I envisioned that it would strip out the "www." when checking availability. So the confirmation message for "[www.example.gov](http://www.example.gov/)" would read: "[example.gov](http://example.gov/) is not available" Is that what you were thinking,

Example: 
 if [example.gov](http://example.gov/) was not available to begin with. I would think yes it strips www. then if [example.gov](http://example.gov/) is already taken it says “[example.gov](http://example.gov/) is not available”. If [example.gov](http://example.gov/) is actually available then entering [www.example.gov](http://www.example.gov/) would result in “[example.gov](http://example.gov/) is available”. Basically have it just ignore a www. at the start.

_Originally posted by @erinysong in https://github.com/cisagov/manage.get.gov/issues/476#issuecomment-1802870748_
            
[Slack thread](https://cisa-corp.slack.com/archives/C05BDEA3C11/p1705599697584059)


Discussion:

Resolving patch:
diff --git a/src/registrar/models/utility/domain_helper.py b/src/registrar/models/utility/domain_helper.py
--- a/src/registrar/models/utility/domain_helper.py
+++ b/src/registrar/models/utility/domain_helper.py
@@ -57,6 +57,9 @@ def _validate_domain_string(domain, blank_ok):
             # If blank ok is true, just return the domain
             return domain
 
+        if domain.startswith("www."):
+            domain = domain[4:]
+
         if domain.endswith(".gov"):
             domain = domain[:-4]
 


Test patch:
diff --git a/src/registrar/tests/test_forms.py b/src/registrar/tests/test_forms.py
--- a/src/registrar/tests/test_forms.py
+++ b/src/registrar/tests/test_forms.py
@@ -64,6 +64,12 @@ def test_requested_domain_valid(self):
         form = DotGovDomainForm(data={"requested_domain": "top-level-agency"})
         self.assertEqual(len(form.errors), 0)
 
+    def test_requested_domain_starting_www(self):
+        """Test a valid domain name with .www at the beginning."""
+        form = DotGovDomainForm(data={"requested_domain": "www.top-level-agency"})
+        self.assertEqual(len(form.errors), 0)
+        self.assertEqual(form.cleaned_data["requested_domain"], "top-level-agency")
+
     def test_requested_domain_ending_dotgov(self):
         """Just a valid domain name with .gov at the end."""
         form = DotGovDomainForm(data={"requested_domain": "top-level-agency.gov"})
Repository: cisagov/manage.get.gov

Issue:
Submission dates for fixture domain requests are blank
### Current Behavior

For applications generated by fixtures, submission dates are not showing because they are not set to begin with

![image](https://github.com/cisagov/manage.get.gov/assets/144387994/46ca040a-3b72-4ff4-be4b-5094eb604bcd)


### Expected Behavior

Submission dates are shown

### Steps to Reproduce

1. Logon as Domain Manager with an account associated with fixtures
2. View Domain request table
3. Date submitted column is blank (for any requests from fixtures)


### Environment

Development sandbox

### Additional Context

Per Alysia, submission date should be added to fixtures for the fake data

### Issue Links

_No response_


Discussion:
This is high impact because it affects testing in sandbox environment. Refined 12-29

Resolving patch:
diff --git a/src/registrar/fixtures_applications.py b/src/registrar/fixtures_applications.py
--- a/src/registrar/fixtures_applications.py
+++ b/src/registrar/fixtures_applications.py
@@ -104,7 +104,7 @@ def _set_non_foreign_key_fields(cls, da: DomainApplication, app: dict):
             # Random choice of agency for selects, used as placeholders for testing.
             else random.choice(DomainApplication.AGENCIES)  # nosec
         )
-
+        da.submission_date = fake.date()
         da.federal_type = (
             app["federal_type"]
             if "federal_type" in app


Test patch:
Repository: cisagov/manage.get.gov

Issue:
Update Success Message on "Your contact information" page
### Issue description

On "Your contact information page" in the Domain Management pages we have explainer text that says: Updating your contact information here will update the contact information for all domains in your account.

 However, in the success message we say: "Your contact information for this domain has been updated." This is misleading.



### Acceptance criteria

- [x] Change the success text to say "Your contact information for all your domains has been updated."

### Additional context

_No response_

### Links to other issues

_No response_


Discussion:

Resolving patch:
diff --git a/src/registrar/views/domain.py b/src/registrar/views/domain.py
--- a/src/registrar/views/domain.py
+++ b/src/registrar/views/domain.py
@@ -555,7 +555,7 @@ def form_valid(self, form):
         # Post to DB using values from the form
         form.save()
 
-        messages.success(self.request, "Your contact information has been updated.")
+        messages.success(self.request, "Your contact information for all your domains has been updated.")
 
         # superclass has the redirect
         return super().form_valid(form)


Test patch: