Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-25319] fix FQDN stytle hostname error in use_user_hosts #5144

Merged
merged 1 commit into from
Apr 25, 2024
Merged

[CBRD-25319] fix FQDN stytle hostname error in use_user_hosts #5144

merged 1 commit into from
Apr 25, 2024

Conversation

kisoo-han
Copy link
Contributor

http://jira.cubrid.org/browse/CBRD-25319

Description

  • Fix usage of FQDN (like cubrid.co.kr) with 'use_user_hosts' service

Remarks

  • To verify the valid hostname, following codes were used:
321  else if (is_valid_ip (temp_token) == true)
322    {
323      continue;
324    }
325  else if (is_valid_hostname (temp_token, str_len) == false)
326   {
327     continue;
328   }
  • When line # 321 is called, the temp_token value can be changed to NULL or another value by strtok_r (), which is what we didn't expect.
  • In this case, is_valid_hostname () could fails at line#325, with subject hostname to NULL
    • maybe it have been called in is_valid_hostname (NULL, 7) style, not is_valid_hostname ("dev2.com", 7)

@kisoo-han kisoo-han requested a review from beyondykk9 as a code owner April 24, 2024 01:07
@kisoo-han kisoo-han self-assigned this Apr 24, 2024
@kisoo-han kisoo-han requested review from mhoh3963 and airnet73 April 24, 2024 01:17
@kisoo-han kisoo-han merged commit 14ba0d6 into CUBRID:develop Apr 25, 2024
9 checks passed
@kisoo-han kisoo-han deleted the CBRD-25319-user-hosts-FQDN-error branch April 25, 2024 00:07
YeunjunLee pushed a commit that referenced this pull request Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants